genify / babel-plugin-transform-remove-strict-mode

remove strict mode for babel transform
MIT License
97 stars 17 forks source link

Can't get it to work... #1

Open pmorch opened 7 years ago

pmorch commented 7 years ago
> ls -a
.  ..  loose.js

> cat loose.js 
var foo = 'bar';
delete foo;

> yarn add babel-cli babel-plugin-transform-remove-strict-mode
(packages get installed)

> babel --plugins transform-remove-strict-mode loose.js 
SyntaxError: loose.js: Deleting local variable in strict mode (2:0)
  1 | var foo = 'bar';
> 2 | delete foo;
    | ^
  3 | 

> egrep '^(babel-core|babel-plugin-transform-remove-strict-mode)' yarn.lock 
babel-core@^6.24.1:
babel-plugin-transform-remove-strict-mode@^0.0.2:

What am I missing? Isn't it still in strict mode?

eakarpov commented 5 years ago

Does not work. Maybe it is for an old version of Babel...

wanwanqichao commented 3 years ago

Does not work. Maybe it is for an old version of Babel...

try this.. “npm install babel-plugin-transform-remove-strict-mode@0.0.2”