Alex Buddy Alex Buddy - 4 months ago 115x
CSS Question

webpack doesn't want to load normilize.css

I decided to try webpack recently and, basically, I have two style files for an app - style.css and normilize. But there's a problem - whenever I try to compile it with webpack it throws error:

ERROR in C:/Users/Man/~/css-loader!./~/postcss-loader!./css/normalize.css
C:\Users\Man\Desktop\work\js_tr\css\normalize.css:59:29: Unknown word
display: inline-block; // 1
vertical-align: baseline; // 2

ERROR in C:/Users/Man/~/css-loader!./~/postcss-loader!./css/normalize.css
Module build failed: TypeError: Cannot read property 'toString' of undefined
at new Input (C:\Users\Man\node_modules\css-loader\node_modules\postcss\lib\input.js:31:23)
at parse (C:\Users\Man\node_modules\css-loader\node_modules\postcss\lib\parse.js:22:17)
at new LazyResult (C:\Users\Man\node_modules\css-loader\node_modules\postcss\lib\lazy-result.js:61:24)
at Processor.process (C:\Users\Man\node_modules\css-loader\node_modules\postcss\lib\processor.js:34:16)
at processCss (C:\Users\Man\node_modules\css-loader\lib\processCss.js:188:11)
at Object.module.exports (C:\Users\Man\node_modules\css-loader\lib\loader.js:24:2)
@ ./css/normalize.css 4:14-131

What might it be? How should I load normilize.css with webpack?


In CSS there is not // comments. Single line comments starts with /* and ends with */. So, you need to replace your normalize.css with this one.