У меня была проблема с веб-пакетом, как показано ниже
ERROR in ./css/style.css 1:0
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
Это мой style.css
@import url("https://fonts.googleapis.com/css?family=Oxygen:400,300,700");
* {
outline: 0;
margin: 0;
padding: 0;
}
Я думаю, что проблема из "@" style.css.
как мне добавить загрузчик для решения этой проблемы?
это мой webpack.config.js
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
module: {
rules: [
{
test: /\.css$/,use: [ 'style-loader', 'css-loader' ],
test: /\.(png|jpg|gif)$/,use: [ 'url-loader' ]
}
]
}
};