bundle-loader icon indicating copy to clipboard operation
bundle-loader copied to clipboard

The trouble of 'require("bundle-loader?lazy&name=my-chunk!./file.js");'

Open Molin123 opened this issue 8 years ago • 1 comments

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

Molin123 avatar Apr 20 '17 09:04 Molin123

I'm also interested in hearing about this.

haf avatar Jun 29 '17 13:06 haf