mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-27 12:53:13 +03:00
c23a80e6f0
no issue By default, CRAs build process creates chunked script files and adds them to default index.html. The updated build process uses `rewire` and `webpack` to - - Tweak CRAs default behavior by switching off chunking, which leads to a single script - Uses webpack locally to combine JS and CSS built by above step into a single `bundle.min.js`
11 lines
266 B
JavaScript
11 lines
266 B
JavaScript
const rewire = require('rewire');
|
|
const defaults = rewire('react-scripts/scripts/build.js');
|
|
let config = defaults.__get__('config');
|
|
|
|
config.optimization.splitChunks = {
|
|
cacheGroups: {
|
|
default: false,
|
|
},
|
|
};
|
|
|
|
config.optimization.runtimeChunk = false; |