这个Webpack错误表示什么?
Error: Rule can only have one result source (provided use and loaders) in {
"test": {},
"loaders": [
"style-loader",
{
"loader": "css-loader",
"options": {
"importLoaders": 1
}
},
{
"loader": "postcss-loader",
"options": {
"plugins": [
null
]
}
}
],
"use": [
"style-loader",
"vue-style-loader",
{
"loader": "css-loader",
"options": {
"importLoaders": 1
}
},
{
"loader": "postcss-loader",
"options": {
"plugins": [
null
]
}
}
]
}
以下是我的webpack.config.js文件:
const path = require('path');
const package = require('./package');
module.exports = {
mode: 'development',
resolve: {
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
},
// this will apply to both plain `.js` files
// AND `<script>` blocks in `.vue` files
{
test: /\.js$/,
loader: 'babel-loader'
},
// this will apply to both plain `.css` files
// AND `<style>` blocks in `.vue` files
{
test: /\.css$/,
use: [
'vue-style-loader',
'css-loader'
]
},
{
test: /\.svg$/,
include: [path.join(__dirname, 'public/icons/svg')],
loaders: [{
loader: 'svg-sprite-loader',
options: {
symbolId: '[name]',
},
},
{
loader: 'file-loader',
options: {
name: 'public/[name].[ext]?[hash]',
}
},
{
loader: 'img-loader',
}
]
},
{
test: /\.(ttf|woff)$/i,
loader: 'file-loader',
},
{
test: /\.(md|yml)$/,
loader: 'null-loader'
}
],
}
};