forked from jellyfin/jellyfin-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.common.js
40 lines (37 loc) · 1.15 KB
/
webpack.common.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
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
const Assets = [
'alameda/alameda.js',
'native-promise-only/npo.js',
'libass-wasm/dist/js/subtitles-octopus-worker.js',
'libass-wasm/dist/js/subtitles-octopus-worker.data',
'libass-wasm/dist/js/subtitles-octopus-worker.wasm',
'libass-wasm/dist/js/subtitles-octopus-worker-legacy.js',
'libass-wasm/dist/js/subtitles-octopus-worker-legacy.data',
'libass-wasm/dist/js/subtitles-octopus-worker-legacy.js.mem'
];
module.exports = {
context: path.resolve(__dirname, 'src'),
entry: './bundle.js',
stats: 'errors-only',
resolve: {
modules: [
path.resolve(__dirname, 'node_modules')
]
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: 'amd-require'
},
plugins: [
new CopyPlugin(
Assets.map(asset => {
return {
from: path.resolve(__dirname, `./node_modules/${asset}`),
to: path.resolve(__dirname, './dist/libraries')
};
})
)
]
};