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

presets fail #23

Closed
TrySound opened this issue Dec 31, 2015 · 3 comments
Closed

presets fail #23

TrySound opened this issue Dec 31, 2015 · 3 comments

Comments

@TrySound
Copy link
Member

If presets is not defined I get this error

An unexpected situation arose. Please raise an issue at https://github.com/rollup/rollup-plugin-babel/issues. Thanks!

Need more smart detection for more informative errors.

@Rich-Harris
Copy link
Contributor

The error worked though – you're here 😀

I think we need to ensure that the http://babeljs.io/docs/plugins/transform-es2015-classes/ plugin is enabled for the preflight check, since that's what helps us figure out how helpers are being treated.

@TrySound
Copy link
Member Author

@Rich-Harris How do this without re resolving .babelrc?

@Rich-Harris
Copy link
Contributor

Think we just need to change this line to this:

var check = transform( 'export default class Foo {}', assign( {}, localOpts, {
  plugins: [ 'transform-es2015-classes' ]
}).code;

The passed-in options are merged into the nearest .babelrc, IIRC

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