Skip to content

Commit 75a1ac7

Browse files
committed
add readme for extra directive and comment triggers
1 parent 519de45 commit 75a1ac7

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,27 @@ module.exports = {
5959
sourceMap: "inline",
6060
};
6161
```
62+
63+
### Usage Extra Directive or Comment Triggers
64+
65+
You can add more directive or comment triggers for removal of `'use strict'`. In the following example, `'use babel'` directive or comments that include `'@babel'` or `'@flow'` also instruct the plugin to become active and remove `'use strict'`
66+
```js
67+
let presets = [];
68+
69+
let plugins = [
70+
[
71+
"babel-plugin-transform-not-strict",
72+
{
73+
directiveTriggers: ['use babel'],
74+
commentTriggers: ['@babel', '@flow', '* @babel', '* @flow'],
75+
},
76+
],
77+
];
78+
79+
module.exports = {
80+
presets: presets,
81+
plugins: plugins,
82+
exclude: "node_modules/**",
83+
sourceMap: "inline",
84+
};
85+
```

0 commit comments

Comments
 (0)