Files
nym/nym-wallet/webpack.common.js
T
Fouad 0115b02be3 Wallet - Node Tester (#3551)
* error handling + edge cases + types

* use bonded node id

* add UI and move feature to node-settings dir

* use error modal

* add type for postMessage arg

* add timeout for node test

* update storybook ci

* fix CI for typescript linting

* fix print node test results

* replace react-to-print lib with vanilla solution

* async print

* update wallet changelog
2023-06-23 14:00:28 +01:00

37 lines
1.2 KiB
JavaScript

const path = require('path');
const { mergeWithRules } = require('webpack-merge');
const { webpackCommon } = require('@nymproject/webpack');
const entry = {
auth: path.resolve(__dirname, 'src/auth.tsx'), // JS bundle for sign up/sign in
main: path.resolve(__dirname, 'src/main.tsx'), // JS bundle for main app
log: path.resolve(__dirname, 'src/log.tsx'), // JS bundle for logging window
};
module.exports = mergeWithRules({
module: {
rules: {
test: 'match',
use: 'replace',
},
},
})(
webpackCommon(__dirname, [
{ filename: 'index.html', chunks: ['auth'], template: path.resolve(__dirname, 'public/index.html') }, // the starting point is index.html (sign up/sign in)
{ filename: 'main.html', chunks: ['main'], template: path.resolve(__dirname, 'public/index.html') }, // main app (loaded after sign in in a new window)
{ filename: 'log.html', chunks: ['log'], template: path.resolve(__dirname, 'public/log.html') }, // the user can open a separate logging window
]),
{
entry,
output: {
clean: true,
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js',
publicPath: '/',
},
experiments: {
asyncWebAssembly: true,
},
},
);