Created
July 31, 2021 00:51
-
-
Save vaporwavie/d4edf13318bbe13b2dbce16c667af15f to your computer and use it in GitHub Desktop.
Disable webpack code-splitting.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// craco.config.js | |
module.exports = { | |
webpack: { | |
configure: { | |
output: { | |
filename: 'static/js/[name].js', | |
}, | |
optimization: { | |
runtimeChunk: false, | |
splitChunks: { | |
chunks(chunk) { | |
return false | |
}, | |
}, | |
}, | |
}, | |
}, | |
plugins: [ | |
{ | |
plugin: { | |
overrideWebpackConfig: ({ webpackConfig }) => { | |
webpackConfig.plugins[5].options.filename = 'static/css/[name].css' | |
return webpackConfig | |
}, | |
}, | |
options: {}, | |
}, | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment