Ghost/ghost/portal/scripts/start-combined.js
Rishabh 885fe178dd Updated local start mode script
no issues

- adds new start-combined script which combines all chunks in `yarn start` for local portal development
- allows easier loading of local portal bundle in ghost via load-portal script, which needs to inject single script
- updates `yarn start:dev` to use updated script which uses the combined mode for better local development

refs
https://gist.github.com/simpixelated/90a3c16c3ed268fe24f5e5c9585ced2f
2021-06-16 20:58:44 +05:30

15 lines
409 B
JavaScript

const rewire = require('rewire');
const defaults = rewire('react-scripts/scripts/start.js');
let configFactory = defaults.__get__('configFactory');
defaults.__set__('configFactory', (env) => {
const config = configFactory(env);
config.optimization.splitChunks = {
cacheGroups: {
default: false
}
};
config.optimization.runtimeChunk = false;
return config;
});