-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvue.config.js
More file actions
59 lines (58 loc) · 1.29 KB
/
vue.config.js
File metadata and controls
59 lines (58 loc) · 1.29 KB
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
57
58
59
const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
module.exports = defineConfig({
publicPath: '/',
configureWebpack: {
devServer: {
historyApiFallback: true
},
module: {
rules: [
{
test: /\.txt/,
type: 'asset/source'
},
{
test: /\.md$/,
loader: 'raw-loader',
}
]
},
plugins: [
new NodePolyfillPlugin(),
new webpack.ProvidePlugin({
process: 'process/browser',
Buffer: ['buffer', 'Buffer']
})
],
resolve: {
fallback: { // browser polyfills
path: require.resolve('path-browserify'),
crypto: require.resolve('crypto-browserify'),
stream: require.resolve('stream-browserify')
}
}
},
transpileDependencies: [
'quasar'
],
pluginOptions: {
quasar: {
importStrategy: 'kebab',
rtlSupport: false
}
},
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(options => {
options.compilerOptions = {
...options.compilerOptions,
isCustomElement: tag => tag === 'lottie-player'
}
return options
})
}
})