I tried plugin transform-remove-strict-mode but it doesn't worked. Result format is iife and I'm using rollup in gulp (and babel as a rollup plugin).
There's now a babel plugin that you can add to your config that will remove strict mode: babel-plugin-transform-remove-strict-mode. It's a little ugly in that the "use strict" gets added and then removed, but it makes the config much nicer.
For babel 6 instead of monkey patching the preset and/or forking it and publishing it, you can also just wrap the original plugin and set the strict option to false.
As of today, it seems that @babel/polyfill is now deprecated. It is said to use manually the core-js and regenerator-runtime. Here is how I solve the issue. Install the necessary dependencies. Configure Babel. Configure Rollup. Sorry, something went wrong. update code.js成3, 移除babel/polyfill與 core.js2的舊設定, 改用babel/runtime來做li…
The Rollup team is attempting to clean up the Issues backlog in the hopes that the active and still-needed, still-relevant issues bubble up to the surface. With that, we're closing issues that have been open for an eon or two, and have gone stale like pirate hard-tack without activity.
Use strict: false
in the output
options as per
the documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With