Skip to content

Commit 3987881

Browse files
mistercrunchclaude
andcommitted
refactor(webpack): standardize TypeScript memory limit to 4096 MB
Set consistent memory limit for ForkTsCheckerWebpackPlugin across development and production builds using a TYPESCRIPT_MEMORY_LIMIT constant. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 45a8e8e commit 3987881

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

superset-frontend/webpack.config.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ const devserverHost =
6565
const isDevMode = mode !== 'production';
6666
const isDevServer = process.argv[1].includes('webpack-dev-server');
6767

68+
// TypeScript checker memory limit (in MB)
69+
const TYPESCRIPT_MEMORY_LIMIT = 4096;
70+
6871
const output = {
6972
path: BUILD_DIR,
7073
publicPath: '/static/assets/',
@@ -200,7 +203,7 @@ if (isDevMode) {
200203
plugins.push(
201204
new ForkTsCheckerWebpackPlugin({
202205
typescript: {
203-
memoryLimit: 8192,
206+
memoryLimit: TYPESCRIPT_MEMORY_LIMIT,
204207
build: true, // Generate .d.ts files
205208
mode: 'write-references', // Handle project references properly
206209
// Use main tsconfig but with safe performance optimizations
@@ -234,7 +237,7 @@ if (isDevMode) {
234237
plugins.push(
235238
new ForkTsCheckerWebpackPlugin({
236239
typescript: {
237-
memoryLimit: 4096,
240+
memoryLimit: TYPESCRIPT_MEMORY_LIMIT,
238241
build: true,
239242
mode: 'write-references',
240243
},

0 commit comments

Comments
 (0)