-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
56 lines (54 loc) · 1.46 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const { defineConfig } = require('@vue/cli-service');
const path = require('path');
const resolveSrc = (_path) => path.join(__dirname, _path);
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: true,
configureWebpack: {
plugins: [
require('unplugin-auto-import/webpack')({
dts: true,
include: [
/\.[tj]sx?$/, // .ts, .tsx, .js, .jsx
/\.vue$/,
/\.vue\?vue/, // .vue
/\.md$/, // .md
],
imports: ['vue', 'vue-router'],
eslintrc: {
enabled: true, // Default `false`
},
}),
],
resolve: {
alias: {
assets: resolveSrc('src/assets'),
'@utils': resolveSrc('src/utils/'),
'@plugins': resolveSrc('src/plugins/'),
'@components': resolveSrc('src/components'),
'@cc': resolveSrc('src/components'),
'@use': resolveSrc('src/composables/'),
// 'vue': '@vue/runtime-dom'
}
}
},
css: {
extract: false,
sourceMap: process.env.NODE_ENV !== 'production'
},
chainWebpack: config => {
config
.plugin('html')
.tap(args => {
args[0].title = "Word Helper";
return args;
})
// config.resolve.alias.set(
// 'vue$',
// // If using the runtime only build
// path.resolve(__dirname, 'node_modules/vue/dist/vue.runtime.esm.js')
// // Or if using full build of Vue (runtime + compiler)
// // path.resolve(__dirname, 'node_modules/vue/dist/vue.esm.js')
// )
},
});