{ test: /\.css$/,
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [
require('autoprefixer')({
browsers: ['last 5 versions']
})
]
}
}
] }
use: [
'style-loader',
'css-loader',
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: [
require('autoprefixer')({
browsers: ['last 5 versions']
})
]
}
}
] }
2018-11-06
const path = require('path')
module.exports = {
mode: "development",
entry: './src/script/main.js',
output: {
path: path.resolve(__dirname, 'dist/js'),
filename: 'bundle.js'
}
}
module.exports = {
mode: "development",
entry: './src/script/main.js',
output: {
path: path.resolve(__dirname, 'dist/js'),
filename: 'bundle.js'
}
}
2018-11-05
webpack hello.js -o ./hello.bundle.js --mode development --module-bind css=style-loader!css-loader
2018-11-05
最赞回答 / 小白小白小白啦
估计是你的版本比较高,需要修改一下filename,<...code...>更详细的你可以查看一下中文官网 https://www.webpackjs.com/configuration/output/#output-filename
2018-10-31