-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable split chunk in build #13906
Comments
I tried this one. gatsby-node.js const webpack = require(`webpack`);
exports.onCreateWebpackConfig = ({ stage, actions }, options) => {
console.log('==== Disabling Chunk ====');
if ((process.env.NODE_ENV === 'production' && stage === 'build-javascript') || options.development) {
actions.setWebpackConfig({
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1
})
]
});
}
}; |
hi @nsisodiya, would this work for your needs?
From what I can tell (I think) Gatsby creates an entry file for each of your pages, which will create additional JS files in addition to |
@trevorlitsey - I tried, but it didn't worked. |
As mentioned in your other issue we don't recommend changing this behavior of Gatsby. We work hard on making Gatsby as fast as possible and this would decrease your speed. Hence I'm closing this, thanks for the issue! |
@LekoArts what about actually "enhancing" the gatsby config? Is this not recommended when gatsby config does not totally suit us? For example see this #10965 (comment) |
How to disable code splitting. I tried but unable to find suitable settings.
The text was updated successfully, but these errors were encountered: