jozanza / babel-plugin-jsonify-css

7 stars 0 forks source link

Cannot parse google fonts import in semantic-ui css? #1

Open jimthedev opened 7 years ago

jimthedev commented 7 years ago

I get the following error when trying to use babel-plugin-jsonify-css. I am trying to import the css for semantic-ui in my Next.js app. Here are the steps to reproduce.

npm install --save semantic-ui-css

Add the following to your page.

import styles, {
  rule,
  media,
  keyframes,
  fontFace,
  charset,
  raw
} from 'semantic-ui-css/semantic.min.css';

And here are the details of the error:

``` Module build failed: Could not transform CSS rule: { "type": "import", "import": "url(https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic&subset=latin)", "position": { "start": { "line": 11, "column": 1 }, "end": { "line": 11, "column": 100 } } } ```
jozanza commented 7 years ago

@jimthedev right now @import statement isn't supported. I can probably work on adding support for that within the next week or so.