Skip to content

Plugin gives errors in case of // comments #61

@keul

Description

@keul

Seems partially related to #33 or #46

Preamble: I migrated from old version 0.1.1 to 1.0.0-rc4 and a working application stopped working. I already read and performed migration procedure, converting class names and so on.

What I found: if my styled CSS contains comments in the form of // foo bar now I can't complile my app.

The errors is something like this:

ERROR in ./components/mycomponent.js
Module build failed (from ../node_modules/babel-loader/lib/index.js):
Error: ..../xxx.js.js: There was a problem adding namespaces to this CSS in the file .../xxx.js. Error: <css input>:7:3: Unknown word
 CSS:

If I go at line 7 of the CSS string I find a duble-slash.

I don't find any official reference, but I read that both of those kind of comments are legit:

  // This is a comment
  /* this is also a comment */

Unluckily now I have to convert my // to /* */.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions