-
-
Notifications
You must be signed in to change notification settings - Fork 607
Closed
Labels
Description
When I try to load CSS like so require('css!./file.css'); I receive an error:
ERROR in ./~/css-loader!./file.css
Module build failed: Unknown word (5:1)
3 | // load the styles
4 | var content = require("!!./../../../node_modules/css-loader/index.js!./file.css");
> 5 | if(typeof content === 'string') content = [[module.id, content, '']];
| ^
6 | // add the styles to the DOM
7 | var update = require("!./../../../node_modules/style-loader/addStyles.js")(content, {});
8 | if(content.locals) module.exports = content.locals;
Content of the CSS file:
body {
}
Here is a complete sample:
https://gist.github.com/desperate-man/50e522139734934b287382cf63e534af
However if I load the CSS file like this require('style!./file.css'); or this require('./file.css'); I have no errors. Is require('css!'); supposed to work or not? I use version 0.25.0.
taromorimoto, NogsMPLS, morhekil, daslicious, fembd-xu and 90 more