init
This commit is contained in:
@@ -10,7 +10,7 @@ const BASE_URL = process.env.NODE_ENV === "development" ? "/" : "/";
|
|||||||
const sourceMap = process.env.NODE_ENV === "development";
|
const sourceMap = process.env.NODE_ENV === "development";
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publicPath : BASE_URL,
|
publicPath: BASE_URL,
|
||||||
// 如果你不需要使用eslint,把lintOnSave设为false即可
|
// 如果你不需要使用eslint,把lintOnSave设为false即可
|
||||||
lintOnSave: false,
|
lintOnSave: false,
|
||||||
chainWebpack: (config) => {
|
chainWebpack: (config) => {
|
||||||
@@ -22,14 +22,17 @@ module.exports = {
|
|||||||
.use('image-webpack-loader')
|
.use('image-webpack-loader')
|
||||||
.loader('image-webpack-loader')
|
.loader('image-webpack-loader')
|
||||||
.options({
|
.options({
|
||||||
bypassOnDebug: true
|
bypassOnDebug: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
config.module.rule('images').use('url-loader').loader('url-loader').options(
|
config.module.rule('images').use('url-loader').loader('url-loader').options({
|
||||||
{ limit:2,esModule:false}
|
limit: 2,
|
||||||
)
|
esModule: false,
|
||||||
|
outputPath: "img/"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user