Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Babel 6 support #15

Open
kohver opened this issue Nov 19, 2015 · 5 comments
Open

Babel 6 support #15

kohver opened this issue Nov 19, 2015 · 5 comments

Comments

@kohver
Copy link

kohver commented Nov 19, 2015

For reference: new plugin API.

Here is the error:

ERROR in ./src/index.js
Module build failed: TypeError: Plugin is not a function
    at exports.default (<project_path>/node_modules/babel-plugin-react-autoprefix/index.js:91:10)
    at Function.memoisePluginContainer (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:127:13)
    at Function.normalisePlugin (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:161:32)
    at <project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:197:30
    at Array.map (native)
    at Function.normalisePlugins (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
    at OptionManager.mergeOptions (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
    at OptionManager.addConfig (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:221:10)
    at OptionManager.findConfigs (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:364:16)
    at OptionManager.init (<project_path>/node_modules/babel-core/lib/transformation/file/options/option-manager.js:412:12)
 @ multi main
@dtothefp
Copy link

any updates on this?? seems like the rest of the commonly used plugins for React development have caught up to Babel 6

@oguzbilgic
Copy link

+1. Would be really useful

@quangrau
Copy link

+1 Same problem

@jmaguirrei
Copy link

+1 Same problem. Any workaround?

@pke
Copy link

pke commented Jun 23, 2016

This can be fixed but not using Plugin but the plugin is still broken with Babel 6.x in the isStyle function

$ echo "const component = () => ( <div style={{ display:'flex'}}/> )" | babel --presets react --plugins ./node_modules/babel-plugin-react-autoprefix/index.js
TypeError: unknown: Cannot read property 'name' of undefined
    at isStyle (node_modules\babel-plugin-react-autoprefix\index.js:20:19)

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

No branches or pull requests

6 participants