-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.dev.js
49 lines (47 loc) · 1.14 KB
/
webpack.config.dev.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
require('dotenv').config();
const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge').merge;
const common = require('./webpack.config.js');
module.exports = merge(common, {
mode: 'production',
devServer: {
contentBase: [path.join(__dirname, 'dist'), __dirname],
port: 3000,
hot: true,
writeToDisk: true,
mimeTypes: {
typeMap: { 'application/wasm': ['wasm'] },
force: true
},
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Headers': '*',
'Access-Control-Allow-Methods': '*',
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Embedder-Policy': 'require-corp',
},
},
devtool: 'eval-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
plugins: [
new webpack.EnvironmentPlugin({
NETWORK: null,
CONTRACT_ADDRESS: null,
TOKEN_ADDRESS: null,
RELAYER_ADDRESS: null,
RELAYER_URL: null,
RPC_URL: null,
TRANSACTION_URL: null,
ZP_FAUCET_URL: null,
}),
]
});