apply changes from 34c00a150140a55a1fc1c9b9f6118584f8bbfc0f

This commit is contained in:
Jędrzej Stuczyński
2023-12-04 15:09:45 +00:00
parent aec23a4f83
commit 5e6a945eef
+26 -13
View File
@@ -1,33 +1,46 @@
const CopyWebpackPlugin = require('copy-webpack-plugin');
const path = require('path');
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
module.exports = {
performance: {
hints: false,
maxEntrypointSize: 512000,
maxAssetSize: 512000
maxAssetSize: 512000,
},
entry: {
bootstrap: './bootstrap.js',
worker: './worker.js',
bootstrap: "./bootstrap.js",
worker: "./worker.js",
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
},
mode: 'development',
mode: "development",
// mode: 'production',
plugins: [
new CopyWebpackPlugin({
patterns: [
'index.html',
"index.html",
{
from: '../pkg/*.(js|wasm)',
to: '[name][ext]',
from: "../pkg/*.(js|wasm)",
to: "[name][ext]",
},
],
}),
],
devServer: {
proxy: {
'/api': {
target: 'https://sandbox-nym-api1.nymtech.net/',
secure: false,
},
},
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers":
"X-Requested-With, content-type, Authorization",
},
},
experiments: { syncWebAssembly: true },
};
};