You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thanks for writing in. We will most likely not dedicate much time to this in the short to medium-term future.
For posterity, I used the banner plugin because it was the most reliable way of injecting stuff at the top of bundles while preserving sourcemaps. We would likely want to build something similar ourselves, but I recall that doing non-trivial code modifications and preserving source maps is a major PITA. I legit couldn't get it to work.
Environment
[email protected], @sentry/[email protected]
Steps to Reproduce
This injection logic should be placed below
use strict
:sentry-javascript-bundler-plugins/packages/webpack-plugin/src/index.ts
Lines 157 to 160 in febe9ce
In our case, TerserPlugin removes all the
use strict
because it is not at the top of the file.Possible Solution
A possible solution is to do like below:
However, from webpack side, better not to use BannerPlugin to inject code, it's not designed for this. Can refer to webpack/webpack#18202
The text was updated successfully, but these errors were encountered: