我尝试了插件 transform-remove-strict-mode 但它不起作用。结果格式是 iife,我在 gulp 中使用汇总(并将 babel 作为汇总插件)。
问问题
3419 次
3 回答
10
根据文档strict: false
在output
选项中
使用。
于 2018-05-08T14:10:15.477 回答
4
只需确保您strict: false
在配置输出对象中指定。
input: [...],
output: {
...,
strict: false,
},
plugins: [...],
您可以在此处查看默认选项: https ://rollupjs.org/guide/en/#configuration-files
于 2020-11-16T13:22:24.750 回答
1
添加useStrict: false
到汇总配置完成了这项工作
于 2017-02-22T19:44:18.330 回答