So I was following the tutorial on http://webpack.github.io/docs/tutorials/getting-started/ and I was stuck on the css style loader step. Here is my entry.js:
require("!style!css!./style.css");
document.write(require("./content.js"))
this is content.js:
module.exports = "It works from content.js";
this is style.css:
body{
background: yellow;
}
After this, I am running this command:
webpack ./entry.js bundle.js
I am getting this error:
Version: webpack 1.13.0 Time: 866ms Asset Size Chunks Chunk Names bundle.js 10.1 kB 0 [emitted] main [0] ./entry.js 115 bytes {0} [built] [4] ./content.js 45 bytes {0} [built] + 3 hidden modules
ERROR in ./~/css-loader!./style.css Module build failed: ReferenceError: Promise is not defined at LazyResult.async (/var/www/html/webpack/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:157:31) at LazyResult.then (/var/www/html/webpack/node_modules/css-loader/node_modules/postcss/lib/lazy-result.js:79:21) at processCss (/var/www/html/webpack/node_modules/css-loader/lib/processCss.js:198:5) at Object.module.exports (/var/www/html/webpack/node_modules/css-loader/lib/loader.js:24:2) @ ./~/style-loader!./~/css-loader!./style.css 4:14-73
How to fix this?