Skip to content
This repository has been archived by the owner on Jun 27, 2021. It is now read-only.

Is option "loose" passed correctly? #1

Closed
voronianski opened this issue Dec 2, 2015 · 2 comments
Closed

Is option "loose" passed correctly? #1

voronianski opened this issue Dec 2, 2015 · 2 comments

Comments

@voronianski
Copy link
Contributor

I'm wondering is option loose: true passed correctly to require?

Check your source code - https://github.com/bkonkle/babel-preset-es2015-loose/blob/master/index.js#L21

require("babel-plugin-transform-es2015-modules-commonjs", {loose: true}),
[require("babel-plugin-transform-regenerator"), { async: false, asyncGenerators: false }],

You pass options differently to these plugins..

Why I'm asking? The reason is that in my module I need loose option on transform-es2015-classes however using your plugin doesn't help me, but when I paste plugin directly into .babelrc loose works:

{
  "presets": [
    "es2015-loose",
    "react",
    "stage-0"
  ],
  "plugins": [
    "transform-es3-member-expression-literals",
    "transform-es3-property-literals",
    ["transform-es2015-classes", {"loose": true}] // now works
  ]
}
@bkonkle
Copy link
Owner

bkonkle commented Dec 2, 2015

Thanks for the pull request! I've published the update to NPM.

@bkonkle bkonkle closed this as completed Dec 2, 2015
@voronianski
Copy link
Contributor Author

@bkonkle 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants