Skip to content

Commit 40bd716

Browse files
committed
Fix: Webpack config for apps did not work alongside codesplitting
1 parent fe3daac commit 40bd716

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

config/webpack/app-base.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@ module.exports = function configFactory(ops) {
9494
fs: 'empty',
9595
},
9696
mode: o.mode,
97+
/* TODO: We have to disable these optimizations, otherwise they will break
98+
* our code-splitting functionality. Once the code-splitting setup is fixed,
99+
* these optimizations can be enabled again. */
100+
optimization: {
101+
removeEmptyChunks: false,
102+
splitChunks: false,
103+
},
97104
output: {
98105
chunkFilename: `[name]-${now.valueOf()}.js`,
99106
filename: `[name]-${now.valueOf()}.js`,
@@ -102,7 +109,7 @@ module.exports = function configFactory(ops) {
102109
},
103110
plugins: [
104111
new ExtractCssChunks({
105-
chunkFilename: `[name]-${now.valueOf()}.js`,
112+
chunkFilename: `[name]-${now.valueOf()}.css`,
106113
filename: `[name]-${now.valueOf()}.css`,
107114
}),
108115
new webpack.DefinePlugin({

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,5 @@
121121
"mkDistDir:prod": "mkdir -p dist/prod/shared/utils && mkdir -p dist/prod/client",
122122
"test": "npm run lint && npm run jest"
123123
},
124-
"version": "0.6.3"
124+
"version": "0.6.4"
125125
}

0 commit comments

Comments
 (0)