【发布时间】:2016-03-25 19:51:10
【问题描述】:
使用 Babel 6,我正在尝试不在我的编译代码中包含 "use strict"。
我发现添加它的是 "transform-es2015-modules-commonjs" plugin(在 "es2015" preset 中)。
在the source-code 中似乎是inherit "babel-plugin-transform-strict-mode",如果我删除它,它仍然可以正常工作,即它将import "…" 编译成require(…) 而不添加“use strict”。
那么为什么“transform-es2015-modules-commonjs”强制严格模式呢?
【问题讨论】:
标签: babeljs