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

Does this work with Webpack 2? #129

Open
teophilus opened this issue Apr 27, 2017 · 14 comments
Open

Does this work with Webpack 2? #129

teophilus opened this issue Apr 27, 2017 · 14 comments

Comments

@teophilus
Copy link

No description provided.

@teophilus
Copy link
Author

I keep getting an error

Module build failed: Error: Plugin 1 specified in "base" provided an invalid property of "libraryName"

@zhangjh
Copy link

zhangjh commented Apr 28, 2017

I got the erro message like this

Module build failed: Error: Plugin 2 specified in "base" provided an invalid property of "libraryName"

@bytewiz
Copy link

bytewiz commented May 2, 2017

Module build failed: ReferenceError: Unknown plugin "import" specified in "/../.babelrc"

☝️ I keep getting this error when I build my app, even though I have babel-plugin-import installed and included in .babelrc

@ChrisWen960216
Copy link

I also got the same err.Invalid property

@Pryscy
Copy link

Pryscy commented May 12, 2017

+1 same error here

@afc163
Copy link
Contributor

afc163 commented May 13, 2017

@lovetingyuan
Copy link

+1 same error Module build failed: ReferenceError: Unknown plugin "import"

@qcharlieshi
Copy link

qcharlieshi commented Jun 15, 2017

{
"plugins": [["import", { "libraryName": "antd", "style": "css" }]]
}

Wrapping the array in another array seemed to have worked

@lyctea
Copy link

lyctea commented Jun 17, 2017

Can get it to work, Do it like this
1 npm install antd --save-dev
2 npm install babel-plugin-import --save-dev
3 config .babelrc
{ "presets": [ "react", "es2015", "stage-0" ], "plugins": [ "transform-object-rest-spread", "transform-do-expressions", [ "import",{"libraryName": "antd","style": "css"} ] ] }
4 css loader
{ test: /\.css$/, use: ['style-loader', 'css-loader'] }
5 import antd component
image

@valorloff
Copy link

valorloff commented Oct 28, 2017

Module build failed: ReferenceError: Unknown plugin "transform-object-rest-spread"
and so on :)
May be, incompatibility with the React 16?

@junyuanz123
Copy link

@valorloff I think that's just an example, you probably don't need that.

@valorloff
Copy link

Thanks, I agree

@gschandok
Copy link

Facing the same issue...

ReferenceError: Unknown plugin "import" in .babelrc

My babelrc looks like the following:
{
"presets": ["react", "es2015"],
"plugins": [["import", { "libraryName": "antd", "style": "css" }]]
}

Has anyone found the solution??

@junyuanz123
Copy link

@gschandok you have to install babel-plugin-import

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