rusackas opened a new pull request, #38202: URL: https://github.com/apache/superset/pull/38202
### SUMMARY Re-enables `build: true` and `mode: 'write-references'` on `ForkTsCheckerWebpackPlugin` so that `.d.ts` files are generated automatically during webpack dev builds. This removes the need for developers to manually run `npm run plugins:build` after every change. **Background:** PR #35946 (SWC migration) originally added these settings as essential for the dev workflow. PR #37771 had to remove them because story files that import from `@storybook-shared` (a webpack alias to `.storybook/shared/`) cause `rootDir` errors — each plugin tsconfig has `rootDir: "src"`, but `@storybook-shared` resolves outside that directory. **Fix:** `ForkTsCheckerWebpackPlugin` supports `configOverwrite.exclude`, which is applied per-project during `--build` traversal. By excluding `**/*.stories.*` (and `**/*.test.*`), TypeScript never processes story files and thus never attempts to resolve `@storybook-shared`, eliminating the `rootDir` conflict. The existing plugin tsconfigs already exclude stories via their own `exclude` arrays — this change ensures the webpack plugin respects the same exclusion. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — build tooling change, no UI impact. ### TESTING INSTRUCTIONS 1. Run `npm run dev-server` (or `npm run dev`) in `superset-frontend/` 2. Verify the dev server starts without TypeScript rootDir errors 3. Modify a TypeScript file in a plugin (e.g., `plugins/plugin-chart-echarts/src/`) 4. Verify `.d.ts` files are generated in the plugin's `lib/` directory without needing to run `npm run plugins:build` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
