Closed
Description
I have a file called base.css
that has an import statement
@import "normalize.css/normalize.css"
body {
background: red;
}
This is my app.js
:
var css = require('./styles/base.css');
module.exports = function Foo() {
return {
foo: 'bar',
baz: 'gah'
};
};
I've npm installed normalize but running the webpack
command throws:
$ webpack
Hash: 2a64a4ac64b2026975fb
Version: webpack 1.1.8
Time: 82ms
Asset Size Chunks Chunk Names
bundle.js 2019 0 [emitted] main
[0] ./src/app.js 137 {0} [built]
[1] ./src/styles/base.css 177 {0} [built] [1 error]
ERROR in ./src/styles/base.css
Module not found: Error: Cannot resolve file or directory ./normalize.css/normalize.css in /Users/Ryan/Git/webpack-demo/src/styles
@ ./src/styles/base.css 2:1-116
What am I doing wrong? I understand that it's looking in styles dir but I thought it would scan node_modules first?
Metadata
Metadata
Assignees
Labels
No labels