Add support for Webpack's BannerPlugin
#601
Unanswered
guilhermesimoes
asked this question in
Ideas
Replies: 1 comment
|
We are having a similar issue when using the Sentry Webpack plugin, which injects a script to the top of the bundle using !function(){ /* Sentry code here */ }(),(()=>{ /* webpack module here */})();When walking the AST in This in turn means that There's an example at https://github.com/jameshoward/webpack-sentry-demo but an even simpler reproduction is to inject code with a // webpack.config.js
…
plugins: [
new webpack.BannerPlugin({
banner: '(function() { console.log(window); })();',
raw: true
})
] |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Adding the following
BannerPluginto a build:causes webpack-bundle-analyzer not to return an accurate size. This is because when webpack-bundle-analyzer parses a bundle it requires the first thing in the bundle to be the start of a webpack module. It would be great if the parsing logic could be changed to take this plugin into account.
All reactions