question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

webpack tutorial is broken

See original GitHub issue

I followed this tutorial, it is not working when I try to add a css file

cat entry.js

require("!style!css!./style.css");
document.write(require('./content.js'));
webpack_tutorial$ webpack ./entry.js bundle.js 
Hash: 6975b28bf0ad8a1c7ddd
Version: webpack 1.9.10
Time: 42ms
    Asset     Size  Chunks             Chunk Names
bundle.js  1.74 kB       0  [emitted]  main
   [0] ./entry.js 76 bytes {0} [built] [1 error]
   [1] ./content.js 45 bytes {0} [built]

ERROR in ./entry.js
Module not found: Error: Cannot resolve module 'style' in /Users/hongbozhang/git/react.git/code/webpack_tutorial
 @ ./entry.js 1:1-34

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
bobzhangcommented, Jun 9, 2015

ah, it’s css-loader, it would be nice to document it : )

1reaction
SimenBcommented, Jun 1, 2015

npm install --save-dev style-loader?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Broken webpack tutorial · Issue #18438 · angular ... - GitHub
I noticed package.json, ts-config.json, vendor.ts are different and styles.css and bs-config.json are not even mentioned in the tutorial. The ...
Read more >
Learn Webpack - Full Tutorial for Beginners - YouTube
Learn Webpack from Colt Steele in this full tutorial course. It begins with a simple question: "What is webpack ?" Quickly we move...
Read more >
webpack Tutorial: How to Set Up webpack 5 From Scratch
Now Babel is set up, but our Babel plugin is not. You can demonstrate it not working by adding an example pre-Babel code...
Read more >
webpack command not working - node.js - Stack Overflow
I tried to start a project with module-loaders. Firstly, I installed nodeJs and NPM and created a new directory called tutorial . I...
Read more >
Webpack Tutorial for Beginners: A Complete Step ... - CodeinWP
To install webpack 5 requires Node 10.13.0 or higher, so if you haven't updated Node in a while you'll have to do that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found