Skip to content

Instantly share code, notes, and snippets.

@vaporwavie
Created July 31, 2021 00:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vaporwavie/d4edf13318bbe13b2dbce16c667af15f to your computer and use it in GitHub Desktop.
Save vaporwavie/d4edf13318bbe13b2dbce16c667af15f to your computer and use it in GitHub Desktop.
Disable webpack code-splitting.
// 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