jharris4 / html-webpack-tags-plugin

lets you define html tags to inject with html-webpack-plugin
MIT License
255 stars 31 forks source link

object glob found no files #60

Closed IMakiMaki closed 4 years ago

IMakiMaki commented 4 years ago

Run npm run build. Got this: 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/'),
        },
      ],
 }),
IMakiMaki commented 4 years ago

I create a repository.

Here:

https://github.com/IMakiMaki/webpack-learning

IMakiMaki commented 4 years ago

OK.It's my fault.I should inject the file in /library instead of the /dist.