mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-03 03:55:26 +03:00
cc4eda6478
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
15 lines
409 B
JavaScript
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;
|
|
});
|