diff --git a/packages/babel-plugin-transform-es2015-modules-commonjs/package.json b/packages/babel-plugin-transform-es2015-modules-commonjs/package.json index f72c448c35..272c49aa5e 100644 --- a/packages/babel-plugin-transform-es2015-modules-commonjs/package.json +++ b/packages/babel-plugin-transform-es2015-modules-commonjs/package.json @@ -8,9 +8,10 @@ "dependencies": { "babel-types": "^6.0.2", "babel-runtime": "^6.0.2", - "babel-template": "^6.0.2" + "babel-template": "^6.0.2", + "babel-plugin-transform-strict-mode": "^6.0.2" }, "keywords": [ "babel-plugin" ] -} \ No newline at end of file +} diff --git a/packages/babel-plugin-transform-es2015-modules-commonjs/src/index.js b/packages/babel-plugin-transform-es2015-modules-commonjs/src/index.js index 6661edecc9..06020b6e3b 100644 --- a/packages/babel-plugin-transform-es2015-modules-commonjs/src/index.js +++ b/packages/babel-plugin-transform-es2015-modules-commonjs/src/index.js @@ -118,6 +118,8 @@ export default function () { }; return { + inherits: require("babel-plugin-transform-strict-mode"), + visitor: { ThisExpression(path) { if (!path.findParent((path) => !path.is("shadow") && THIS_BREAK_KEYS.indexOf(path.type) >= 0)) { diff --git a/packages/babel-plugin-transform-es2015-modules-systemjs/package.json b/packages/babel-plugin-transform-es2015-modules-systemjs/package.json index 642bfbb4d6..60a064d474 100644 --- a/packages/babel-plugin-transform-es2015-modules-systemjs/package.json +++ b/packages/babel-plugin-transform-es2015-modules-systemjs/package.json @@ -8,9 +8,10 @@ "dependencies": { "babel-template": "^6.0.2", "babel-helper-hoist-variables": "^6.0.2", - "babel-runtime": "^6.0.2" + "babel-runtime": "^6.0.2", + "babel-plugin-transform-strict-mode": "^6.0.2" }, "keywords": [ "babel-plugin" ] -} \ No newline at end of file +} diff --git a/packages/babel-plugin-transform-es2015-modules-systemjs/src/index.js b/packages/babel-plugin-transform-es2015-modules-systemjs/src/index.js index 8d312af8f0..3fa6e8c303 100644 --- a/packages/babel-plugin-transform-es2015-modules-systemjs/src/index.js +++ b/packages/babel-plugin-transform-es2015-modules-systemjs/src/index.js @@ -49,6 +49,8 @@ export default function ({ types: t }) { }; return { + inherits: require("babel-plugin-transform-strict-mode"), + visitor: { Program: { exit(path) {