1 Star 0 Fork 211

xuanding/vue-mchat

forked from user_499098/vue-mchat 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vue.config.js 1.59 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require('path')
const port = 8080
const svgIconDir = 'packages/SvgIcon'
const name = 'Meteor Chat' // page title
function resolve(dir) {
return path.join(__dirname, dir)
}
module.exports = {
publicPath: './',
outputDir: 'chat',
assetsDir: 'static',
// lintOnSave: process.env.NODE_ENV === 'development',
lintOnSave: false,
productionSourceMap: false,
devServer: {
port: port,
open: true,
overlay: {
warnings: false,
errors: true
},
},
configureWebpack: {
name: name,
resolve: {
alias: {
'@': resolve('src')
},
extensions: ['.js', '.vue', '.json', '.ts'],
},
},
chainWebpack(config) {
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
// set svg-sprite-loader
config.module
.rule('svg')
.exclude.add(resolve(svgIconDir))
.end()
config.module
.rule('icons')
.test(/\.svg$/)
.include.add(resolve(svgIconDir))
.end()
.use('svg-sprite-loader')
.loader('svg-sprite-loader')
.options({
symbolId: 'icon-[name]'
})
.end()
// set preserveWhitespace
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.compilerOptions.preserveWhitespace = true
return options
})
.end()
// ts链式配置
config.module
.rule('ts')
.test(/\.tsx?$/)
.use('ts-loader')
.loader('ts-loader')
.options({
appendTsSuffixTo: [/\.vue$/],
}).end()
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xuanding/vue-mchat.git
[email protected]:xuanding/vue-mchat.git
xuanding
vue-mchat
vue-mchat
master

搜索帮助