webpack-inject-plugin icon indicating copy to clipboard operation
webpack-inject-plugin copied to clipboard

Deprecate this plugin and suggest using the BannerPlugin instead

Open sunesimonsen opened this issue 3 years ago • 0 comments

You can achieve the same kind of functionality this way:

    new webpack.BannerPlugin({
      entryOnly: true,
      include: options.bundleName
        ? options.bundleName + ".js"
        : /\.js$/,
      raw: true,
      banner: 'console.log("Injected")',
    }).apply(compiler);

sunesimonsen avatar Nov 17 '22 12:11 sunesimonsen