forked from cawa-93/play-shikimori-online
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
91 lines (72 loc) · 2.32 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
const WebpackExtensionManifestPlugin = require('webpack-extension-manifest-plugin')
const CopyPlugin = require('copy-webpack-plugin')
const baseManifest = require('./src/manifest.js').default
const pkg = require('./package.json')
module.exports = {
chainWebpack: config => {
config.module
.rule('vue')
.use('vue-loader')
.loader('vue-loader')
.tap(options => {
options.hotReload = false
options.fix = true
return options
})
// config.module
// .rule('worker')
// .test(/worker\.js$/)
// .use('worker-loader')
// .loader('worker-loader')
// .end()
config.optimization.delete('splitChunks')
},
filenameHashing: false,
pages: {
player: {
entry: './src/UI/main.ts',
template: './src/UI/index.html',
},
background: {
entry: './src/background/background.ts',
template: './src/background/index.html',
},
},
lintOnSave: 'error',
outputDir: './dist',
configureWebpack: {
devtool: process.env.NODE_ENV === 'production' ? 'source-map' : 'inline-source-map',
performance: {
maxEntrypointSize: 2048000,
maxAssetSize: 2048000,
},
entry: {
'shikimori-watch-button': './src/content-scripts/shikimori-watch-button.ts',
// 'watch-button-myanime-list': './src/content-scripts/myanimelist.ts',
'anime-365-inject': './src/content-scripts/inject-content-scripts.ts',
'anime-365-player': './src/content-scripts/anime365-player-events.ts',
},
output: {
filename: '[name].js',
chunkFilename: '[name].js',
},
plugins: [
new WebpackExtensionManifestPlugin({
config: {
base: baseManifest,
extend: {
description: pkg.description,
version: pkg.version,
author: pkg.author,
},
},
}),
new CopyPlugin([
{from: './src/_locales', to: '_locales'},
]),
],
},
css: {
extract: true,
},
}