The getting-started tutorial doesn’t work on windows

I’m new to webpack 1.9.11 and are following the getting-started tutorial. Unfortunately I can only get to Binding loaders, where I get the following error:

C:\Users\dotnet\Projects\playground\webpack_tut (master)
λ webpack ./entry.js bundle.js --module-bind 'css=style!css'
Hash: 3fd1ef8aa00068f12535
Version: webpack 1.9.11
Time: 52ms
    Asset     Size  Chunks             Chunk Names
bundle.js  1.72 kB       0  [emitted]  main
   [0] ./entry.js 65 bytes {0} [built] [1 error]
   [1] ./style.css 0 bytes [built] [failed]
   [2] ./content.js 47 bytes {0} [built]

ERROR in ./style.css
Module parse failed: C:\Users\dotnet\Projects\playground\webpack_tut\style.css Line 1: Unexpected token {
You may need an appropriate loader to handle this file type.
| body {
|     background: yellow;
| }
 @ ./entry.js 1:0-22

My entry.js:

require("./style.css");
document.write(require("./content.js"));

My style.css:

body {
    background: yellow;
}

npm list --depth=0:

C:\Users\dotnet\Projects\playground\webpack_tut
├── css-loader@0.14.5
├── node-libs-browser@0.5.2
└── style-loader@0.12.3

Author: Fantashit

2 thoughts on “The getting-started tutorial doesn’t work on windows

Comments are closed.