Js | webpack LOADER报错!!!
ERROR in ./style.css 1:5
Module parse failed: Unexpected token (1:5)
You may need an appropriate loader to handle this file type.
> body {
| background: yellow;
| }
@ ./index.js 1:0-22
@ multi ./index.js ./bundle.js
解决办法:在目录下添加webpack.config.js文件
module.exports = {
module: {
rules: [
{ test: /\.css$/, use: 'css-loader' },
{ test: /\.ts$/, use: 'ts-loader' }
]
}
};
解决: