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

A webpack plugin that wraps output files (chunks) with custom text or code.

Results 9 wrapper-webpack-plugin issues
Sort by recently updated
recently updated
newest added

This change implements a cache for `Source`s generated by this plugin so that on subsequent builds (i.e. incremental builds) we can re-use the same `Source` if the content hasn't changed....

I'm using the plugin like this: ```js new WrapperPlugin({ header: (fileName, { hash }) => { return fileName === 'serviceWorker.bundle.js' ? `/* hash: ${hash} */` : '' }, afterOptimizations: true...

For production we use namings like `[name].[contenthash:8].min.js`. We add WrapperPlugin to add a header and a footer, but js-file on CDN didn't change because the contenthash is old.

With Webpack 5 this plugin results in a deprecation warning: ``` (node:96995) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option) at /Users//node_modules/wrapper-webpack-plugin/wrapper-webpack-plugin.js:40:43...

When we use this plugin while running a webpack watch, with many output/entry files, all of these files are registering changes if any file has a change. Since most of...

Types are missing in the npm package tarball.

This PR adds support for `processAssets` - webpack's successor to `optimizeChunkAssets`. Currently, if you use `optimizeChunkAssets` in your build, you will be met with a deprecation warning. I'm not a...

Hello, guys! I have a Preact project that uses Webpack 4 as it's bundling utility. I want to update to Webpack 5. I encountered lots of errors and changes that...

Fix the deprecation error as shown below: compiler.hooks.compilation.tap('WrapperPlugin', (compilation) => { if (this.afterOptimizations) { // you can fix this similar to how I fixed the else statement. compilation.hooks.afterOptimizeChunkAssets.tap('DSWrapperPlugin', (chunks) =>...