-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.web.config.js
44 lines (43 loc) · 1.14 KB
/
webpack.web.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
import path from 'path';
import CopyWebpackPlugin from 'copy-webpack-plugin';
export default {
entry: './src-web/main-web.js',
output: {
filename: 'main.js',
path: path.resolve('dist'),
chunkFilename: '[name].bundle.js',
},
devServer: {
static: {
directory: path.join('dist'),
},
hot: true,
open: false
},
devtool: 'source-map',
mode: 'development',
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
}
],
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: 'src-web/index.html', to: 'index.html' },
// { from: 'src-web/example.mp3', to: 'example.mp3' },
// { from: 'src-web/silence.mp3', to: 'silence.mp3' },
{ from: 'src-web/instruction.svg', to: 'instruction.svg' },
{ from: 'src-web/vidstack', to: 'vidstack' },
],
}),
],
resolve: {
alias: {
'@common': path.resolve('src-common/'),
},
},
};