getsentry / sentry-webpack-plugin

Repo moved to https://github.com/getsentry/sentry-javascript-bundler-plugins. Please open any issues/PRs there.
MIT License
662 stars 116 forks source link

ref: Use var instead of const for module loader for ES5-compat #338

Closed kamilogorek closed 2 years ago

kamilogorek commented 2 years ago

This PR changes the usage of const to var to preserve pre-ES6 compatibility. If we use ES6 syntax, it requires end-user to always transpile it, as we inject directly into the bundle.

Ref: https://github.com/getsentry/sentry-webpack-plugin/pull/307#issuecomment-1002985337

kamilogorek commented 2 years ago

NOTE: Integration tests worked, because we ourselves, use babel-loader in example webpack config 🤭