Ghost/ghost/sodo-search/scripts/start-combined.js
Rishabh e2294ace22 Added custom build for minified script
refs TryGhost/Team#1665

- overrides webpack config to generate single script for publishing
- adds custom scripts for dev and production mode
2022-07-04 15:41:14 +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;
});