Skip to content

Commit d0d6136

Browse files
committed
Create README.md
1 parent 6e28a49 commit d0d6136

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# babel-plugin-transform-not-strict
2+
3+
Remove 'use strict' if the file is 'not strict'
4+
5+
Most of the bundlers and transpilers such as babel add `'use strict'` to the above of your file. This plugin will remove them if you add `'not strict'` to that file.
6+
7+
## Installation
8+
```
9+
npm install --save-dev babel-plugin-transform-not-strict
10+
```
11+
12+
You should also install the peer dependencies:
13+
```
14+
npm install -save-dev "@babel/core"
15+
```
16+
17+
## Usage
18+
1) put the following in above the a file that is not strict:
19+
```js
20+
'not strict'
21+
```
22+
23+
2) Add `"babel-plugin-transform-not-strict"` to the list of your babel plugins.
24+
25+
For example, create a `babel.config.js` file at the root of the project with the following content:
26+
```js
27+
let presets = [];
28+
29+
let plugins = ["babel-plugin-transform-not-strict"];
30+
31+
module.exports = {
32+
presets: presets,
33+
plugins: plugins,
34+
exclude: "node_modules/**",
35+
sourceMap: "inline",
36+
};
37+
```

0 commit comments

Comments
 (0)