v3.4.0
This commit is contained in:
52
source/vue/exam-student/vue.config.js
Normal file
52
source/vue/exam-student/vue.config.js
Normal file
@@ -0,0 +1,52 @@
|
||||
'use strict'
|
||||
const path = require('path')
|
||||
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
publicPath: './',
|
||||
outputDir: 'student',
|
||||
assetsDir: 'static',
|
||||
lintOnSave: true,
|
||||
productionSourceMap: false,
|
||||
devServer: {
|
||||
open: true,
|
||||
host: 'localhost',
|
||||
port: 8001,
|
||||
https: false,
|
||||
hotOnly: false,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://localhost:8000',
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
},
|
||||
pages: {
|
||||
index: {
|
||||
entry: 'src/main.js',
|
||||
template: 'public/index.html',
|
||||
filename: 'index.html'
|
||||
}
|
||||
},
|
||||
chainWebpack (config) {
|
||||
// set svg-sprite-loader
|
||||
config.module
|
||||
.rule('svg')
|
||||
.exclude.add(resolve('src/icons'))
|
||||
.end()
|
||||
config.module
|
||||
.rule('icons')
|
||||
.test(/\.svg$/)
|
||||
.include.add(resolve('src/icons'))
|
||||
.end()
|
||||
.use('svg-sprite-loader')
|
||||
.loader('svg-sprite-loader')
|
||||
.options({
|
||||
symbolId: 'icon-[name]'
|
||||
})
|
||||
.end()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user