add strict option to bable-plugin-transform-strict-mode
This commit is contained in:
@@ -3,9 +3,11 @@ import * as t from "babel-types";
|
||||
export default function () {
|
||||
return {
|
||||
visitor: {
|
||||
Program(path) {
|
||||
let { node } = path;
|
||||
Program(path, state) {
|
||||
if (state.opts.strict === false) return;
|
||||
|
||||
let { node } = path;
|
||||
|
||||
for (let directive of (node.directives: Array<Object>)) {
|
||||
if (directive.value.value === "use strict") return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user