-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
65 lines (64 loc) · 1.77 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
57
58
59
60
61
62
63
64
65
/* eslint-disable */
var path = require('path')
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const os = require('os');
module.exports = {
pages: {
popup: {
template: 'public/index.html',
entry: './src/popup/main.ts',
title: 'Popup'
},
offscreen: {
template: 'public/offscreen.html',
entry: './src/offscreen.js',
title: 'Offscreen'
}
},
pluginOptions: {
browserExtension: {
componentOptions: {
background: {
entry: 'src/service-worker.ts'
},
contentScripts: {
entries: {
'content/autofill': 'src/content/autofill.js',
'content/autofiller': 'src/content/autofiller.ts',
'content/notificationBar': 'src/content/notificationBar.ts',
'content/contextMenuHandler': 'src/content/contextMenuHandler.ts',
'content/shortcuts': 'src/content/shortcuts.ts',
'content/messageHandler': 'src/content/messageHandler.ts',
},
},
},
manifestTransformer: (manifest) => {
if (process.env.NODE_ENV === 'development') {
manifest.content_security_policy.extension_pages = manifest.content_security_policy.extension_pages.replace('script-src', "script-src http://localhost:8098 'wasm-unsafe-eval'");
}
return manifest;
}
}
},
configureWebpack: {
devtool: 'source-map',
resolve: {
alias: {
'jslib-common': path.resolve(__dirname, 'core'),
}
},
plugins: [
new MomentLocalesPlugin({
localesToKeep: ['vi'],
}),
]
},
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.tap(args => {
args.compilerOptions.whitespace = 'preserve'
})
},
}