Skip to content

Commit

Permalink
fix(rspack): stick to commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Nov 12, 2024
1 parent 4d95a74 commit 926c6ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 3 additions & 1 deletion packages/rspack/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
// Imported types only
"@module-federation/sdk",
"@module-federation/enhanced",
"css-loader"
"css-loader",
// required by webpack-subresource-integrity
"webpack"
]
}
]
Expand Down
1 change: 1 addition & 0 deletions packages/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@rspack/core": "^1.0.4",
"@rspack/dev-server": "^1.0.4",
"@rspack/plugin-react-refresh": "^1.0.0",
"webpack": "^5.80.0",
"autoprefixer": "^10.4.9",
"browserslist": "^4.21.4",
"chalk": "~4.1.0",
Expand Down
4 changes: 0 additions & 4 deletions packages/rspack/src/plugins/utils/apply-base-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ function applyNxIndependentConfig(
hashFunction: config.output?.hashFunction ?? 'xxhash64',
// Disabled for performance
pathinfo: config.output?.pathinfo ?? false,
// Use CJS for Node since it has the widest support.
scriptType:
config.output?.scriptType ??
(options.target === 'node' ? undefined : 'module'),
};

config.watch = options.watch;
Expand Down

0 comments on commit 926c6ba

Please sign in to comment.