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

Fails for import statement with no name #2

Open
njordhov opened this issue Jun 1, 2019 · 1 comment
Open

Fails for import statement with no name #2

njordhov opened this issue Jun 1, 2019 · 1 comment

Comments

@njordhov
Copy link

njordhov commented Jun 1, 2019

Thank you for making this very useful babel plugin!

I have verified that version 1.0.0-alpha.11 fails when a import statement for a css file has no explicit name, reporting:

babel-plugin-transform-import-css: ./App.css TypeError: Cannot read property 'name' of undefined

Replicate by placing an import statement like import './App.css' in a javascript file to be processed by transform-import-css.

The offending code is in the classesMapConstAst of index.js due to importNode.local being undefined.

Sara2009 pushed a commit to Sara2009/babel-plugin-transform-import-css that referenced this issue Feb 8, 2020
a-x- pushed a commit that referenced this issue Jul 17, 2020
@aguajardo
Copy link

aguajardo commented Jun 16, 2022

I still get this error for importing CSS from node_modules

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

2 participants