This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7b04d251d60 fix(build): restore automatic .d.ts generation in dev mode 
(#38202)
7b04d251d60 is described below

commit 7b04d251d603fad165c70f4c00f2323e053e26f1
Author: Evan Rusackas <[email protected]>
AuthorDate: Tue Feb 24 11:27:25 2026 -0500

    fix(build): restore automatic .d.ts generation in dev mode (#38202)
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
---
 superset-frontend/webpack.config.js | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/superset-frontend/webpack.config.js 
b/superset-frontend/webpack.config.js
index 8530db279f7..77cadb862f6 100644
--- a/superset-frontend/webpack.config.js
+++ b/superset-frontend/webpack.config.js
@@ -217,24 +217,31 @@ if (!isDevMode) {
   );
 }
 
-// TypeScript type checking configuration
-// SWC handles transpilation. In production, type checking is done by:
-// 1. `npm run plugins:build` which generates .d.ts files
-// 2. `npm run type` which runs full TypeScript checking
-// We skip ForkTsCheckerWebpackPlugin in production because:
-// - Story files import from @storybook-shared which causes rootDir errors
-// - The above commands already provide comprehensive type checking
+// TypeScript type checking and .d.ts generation
+// SWC handles transpilation; this plugin handles type checking separately.
+// build: true enables project references so .d.ts files are auto-generated.
+// mode: 'write-references' writes .d.ts output (no manual `npm run 
plugins:build` needed).
+// Story files are excluded because they import @storybook-shared which 
resolves
+// outside plugin rootDir ("src"), causing errors in --build mode.
 if (isDevMode) {
   plugins.push(
     new ForkTsCheckerWebpackPlugin({
       async: true,
       typescript: {
+        build: true,
+        mode: 'write-references',
         memoryLimit: TYPESCRIPT_MEMORY_LIMIT,
         configOverwrite: {
           compilerOptions: {
             skipLibCheck: true,
             incremental: true,
           },
+          exclude: [
+            'src/**/*.js',
+            'src/**/*.jsx',
+            '**/*.test.*',
+            '**/*.stories.*',
+          ],
         },
       },
     }),

Reply via email to