Closed IMakiMaki closed 4 years ago
Run npm run build. Got this: AssertionError [ERR_ASSERTION]: HtmlWebpackTagsPlugin.options.tags object glob found no files
npm run build
AssertionError [ERR_ASSERTION]: HtmlWebpackTagsPlugin.options.tags object glob found no files
Here is my webpack plugins config:
new CopyWebpackPlugin([ { from: path.join(__dirname, 'library/*.js'), to: 'vendors/', flatten: true }, ]), ...htmlWebpackPlugins, new HtmlWebpackTagsPlugin({ tags: [ { append: false, path: 'vendors', glob: '*.js', globPath: path.resolve(__dirname, '../dist/vendors/'), }, ], }),
I create a repository.
Here:
https://github.com/IMakiMaki/webpack-learning
OK.It's my fault.I should inject the file in /library instead of the /dist.
/library
/dist
Run
npm run build
. Got this:AssertionError [ERR_ASSERTION]: HtmlWebpackTagsPlugin.options.tags object glob found no files
Here is my webpack plugins config: