Ghost/apps/comments-ui/scripts/start-combined.js
Rishabh cc4eda6478 Added custom build setup
refs https://github.com/TryGhost/Team/issues/1664

- overrides webpack config to generate single script for publishing
- adds custom scripts for dev and production mode
2022-07-04 15:15:01 +02:00

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;
});