Closed brucewar closed 2 years ago
exactly the same problem and everything is also ok if you install version 2.1.0
@brucewar @antipenko
I can't recreate this issue with the following packages:
Can you give me a minimal example of a configuration that recreates this error?
const WrapperPlugin = require('wrapper-webpack-plugin');
{
plugins: [
new Wrapper({
header: '(function() {\n',
footer: '\n})();'
})
]
}
Ah yes, I managed to reproduce this. It seems like the way source concatenation is done in webpack 5 doesn't work in webpack 4, and the commit that fixed compatibility with webpack 5 broke backwards compatibility with webpack 4.
79f498302b2adbfc77e566a0a860ef046352bce3 fixes this by trying to use whichever one is available, and from my testing works with both webpack 4 and 5.
Published new version 2.2.2 to npm which includes this fix.
@levp Sorry i miss your previus comment. Thanks you for fast fix!🙏
This error occurs recently, but
2.1.0
has no problem