TrySound / babel-plugin-iife-wrap

Babel plugin to wrap file with iife
MIT License
6 stars 2 forks source link

(Documentation) Does this plugin add use strict or not? #3

Closed davidshepherd7 closed 6 years ago

davidshepherd7 commented 8 years ago

I noticed that in your tests you expect use strict to have been added to the result, but this isn't mentioned in the readme.

TrySound commented 8 years ago

@davidshepherd7 Test is the best doc :) Would you like to send a PR with mention?

davidshepherd7 commented 8 years ago

I would but I'm not entirely sure what it actually does do.

TrySound commented 8 years ago

According tests it adds 'use strict'; if it is not present.

davidshepherd7 commented 8 years ago

Is that unconditionally, or with a certain configuration? Do you need to install an additional plugin to get the use strict?

TrySound commented 8 years ago

@davidshepherd7 It inherits strict mode plugin, so you don't need. And yes it's unconditionally.