-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.deploy.cjs
42 lines (36 loc) · 957 Bytes
/
webpack.deploy.cjs
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
const path = require('path');
const outputFolder = path.resolve(__dirname, 'build/example/testpage');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = [
{
mode: 'development',
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: './example/testpage/index.html', to: `${outputFolder}/index.html` },
],
}),
],
entry: {
testpage: './example/testpage/testpage.js',
},
output: {
filename: '[name].js',
path: outputFolder,
},
optimization: {
minimize: false,
},
devServer: {
https: true,
compress: true,
host: '0.0.0.0',
port: 8443,
static: [
{
directory: outputFolder,
},
],
},
},
];