-
Notifications
You must be signed in to change notification settings - Fork 28
/
vue.config.js
30 lines (29 loc) · 900 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
// vue.config.js
const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
outputDir: 'dist',
indexPath: 'templates/index.html',
assetsDir: 'static',
productionSourceMap: false,
css: {
extract: true,
sourceMap: false
},
transpileDependencies: true,
configureWebpack: {
plugins: [
AutoImport({
resolvers: [ElementPlusResolver({importStyle: false})],
}),
Components({
resolvers: [ElementPlusResolver({importStyle: false})],
}),
new NodePolyfillPlugin(),
],
},
})