-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
38 lines (35 loc) · 869 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const { resolve } = require('path')
const vueCompositionAPI = resolve(
'./node_modules/@vue/composition-api/dist/vue-composition-api.mjs'
)
/**
* @type {import('@vue/cli-service').ProjectOptions}
*/
module.exports = {
lintOnSave: false,
chainWebpack: config => {
// 禁用运行时 ts 类型检查
config.plugins.delete('fork-ts-checker')
// 禁用 Prettier
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.prettify = false
return options
})
// 修复路径
config.resolve.alias.set(
'@vue/composition-api/dist/vue-composition-api.mjs',
vueCompositionAPI
)
},
configureWebpack: config => {
config.devtool = 'source-map'
config.module.rules.push({
test: /\.mjs$/,
include: /node_modules/,
type: 'javascript/auto'
})
}
}