bundle-loader
bundle-loader copied to clipboard
The trouble of 'require("bundle-loader?lazy&name=my-chunk!./file.js");'
If I use the code below , it won't work ! It is just like that I didn't use bundle-loader.
import file from "bundle-loader?lazy&name=my-chunk!./file.js";
But if I modify my code below ,it work !
import file from "bundle-loader?lazy&name=my-chunk-[name]!./file.js";
The webpack.config.js in my project is:
output: {
path: path.resolve(__dirname, './output'),
filename: '[name].[chunkhash:8].bundle.js',
chunkFilename: '[name]-[id].[chunkhash:8].bundle.js',
},
BTW:The version I used is react^15.4.2 & react-router-dom^4.0.0 & bundle-loader^6.4.1
I'm also interested in hearing about this.