add strict mode plugin to module transforms
This commit is contained in:
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,6 +49,8 @@ export default function ({ types: t }) {
|
||||
};
|
||||
|
||||
return {
|
||||
inherits: require("babel-plugin-transform-strict-mode"),
|
||||
|
||||
visitor: {
|
||||
Program: {
|
||||
exit(path) {
|
||||
|
||||
Reference in New Issue
Block a user