Skip to content
This repository was archived by the owner on Jun 28, 2021. It is now read-only.
This repository was archived by the owner on Jun 28, 2021. It is now read-only.

Parsing error when importing css #467

Open
@HarrisTurtle

Description

@HarrisTurtle

Hi,

I just installed react-mdl and when I write the imports in my main.js (index.js in your How-to) I get this error:

C:\Dev\MyProject\node_modules\react-mdl\extra\material.css:8
@charset "UTF-8";
^
SyntaxError: Invalid or unexpected token
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:542:28)
at Module._extensions..js (module.js:579:10)
at Object.require.extensions.(anonymous function) [as .js] (C:\Dev\MyProject\node_modules\babel-register\lib\node.js:152:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (C:/Dev/MyProject/server/server.js:16:1)

My setup is with gulp + browserify.
"react": "^15.4.2",
"express": "^4.13.3",
"gulp": "^3.9.0",
"browserify": "^12.0.1",
"babel-core": "^6.1.19",
"babel-preset-es2015": "^6.1.18",
"babel-preset-react": "^6.1.18",
"babel-preset-stage-1": "^6.22.0",
"babel-preset-stage-2": "^6.22.0",

If I just avoid those imports and try to import a button in a component. The button isn't rendered on client side, but it is generated on server side.

Thanks!

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