Skip to content

Fails for import statement with no name #2

@njordhov

Description

@njordhov

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions