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`
20 lines
405 B
JavaScript
20 lines
405 B
JavaScript
const path = require("path")
|
|
const glob = require("glob")
|
|
|
|
module.exports = {
|
|
entry: {
|
|
"bundle.js": glob.sync("build/static/?(js|css)/main.*.?(js|css)").map(f => path.resolve(__dirname, f)),
|
|
},
|
|
output: {
|
|
filename: "build/static/js/bundle.min.js",
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.css$/,
|
|
use: ["style-loader", "css-loader"],
|
|
},
|
|
],
|
|
},
|
|
plugins: [],
|
|
} |