40 lines
984 B
JavaScript
40 lines
984 B
JavaScript
const path = require('path');
|
|
const CopyWebpackPlugin = require("copy-webpack-plugin")
|
|
function resolve (dir) {
|
|
return path.join(__dirname, dir)
|
|
}
|
|
module.exports = {
|
|
runtimeCompiler: true,
|
|
lintOnSave: true,
|
|
chainWebpack: (config)=>{
|
|
config.resolve.alias
|
|
.set('@', resolve('src'))
|
|
.set('components',resolve('src/components'))
|
|
.set('utils',resolve('src/utils'))
|
|
.set('assets',resolve('src/assets'))
|
|
// .set('static',resolve('src/static'))
|
|
},
|
|
pluginOptions: {
|
|
"style-resources-loader": {
|
|
preProcessor: "less",
|
|
// patterns: [path.resolve(__dirname, "src/assets/global.less")]
|
|
},
|
|
svg: {
|
|
inline: {}, // Pass options to vue-svg-loader
|
|
data: {}, // Pass options to url-loader
|
|
sprite: {}, // Pass options to svg-sprite-loader
|
|
external: {} // Pass options to file-loader
|
|
}
|
|
},
|
|
configureWebpack: {
|
|
// plugins: [
|
|
// new CopyWebpackPlugin({
|
|
// patterns:[{
|
|
// from: "./src/static",
|
|
// to: 'static'
|
|
// }]
|
|
// })
|
|
// ]
|
|
}
|
|
}
|