add-asset-html-webpack-plugin
add-asset-html-webpack-plugin copied to clipboard
Glob pattern doesn't work
I used glob to refer the dll file, and got an error:
Error: Cannot find module '../static/js/**/*.dll.js' Does
require.resolve()
api realy support glob ?
MyProject
├───build
│ └───webpack.prod.conf.js
├───static
│ └───js
│ └───library_xxx.dll.js
└───package.json
- webpack.prod.conf.js
new AddAssetHtmlPlugin({
filepath: require.resolve(`../static/js/**/*.dll.js`),
}),
Might be better to do path.resolve(__dirname, '../static/js/**/*.dll.js')
. If that works, wanna send a PR updating the docs?
try this:
new AddAssetHtmlPlugin({
filepath: `../static/js/**/*.dll.js`,
}),