Files
nym/nym-connect/webpack.common.js
T
Mark Sinclair d8369eb4c9 Test and earn
- add logging and clear local storage menu items
- bump nym-connect version
- add app version number
- add reset trigger when clearing SP storage
- bump tauri version (nym-connect and nym-wallet)
- fix webpack config for prod builds
- new selector for services, with an advanced section for service providers
2022-12-19 18:18:08 +00:00

60 lines
1.4 KiB
JavaScript

const path = require('path');
const { mergeWithRules } = require('webpack-merge');
const { webpackCommon } = require('@nymproject/webpack');
const entry = {
app: path.resolve(__dirname, 'src/index.tsx'),
growth: path.resolve(__dirname, 'src/growth.tsx'),
log: path.resolve(__dirname, 'src/log.tsx'),
};
module.exports = mergeWithRules({
module: {
rules: {
test: 'match',
use: 'replace',
},
},
})(
webpackCommon(__dirname, [
{ filename: 'index.html', chunks: ['app'], template: path.resolve(__dirname, 'public/index.html') },
{ filename: 'log.html', chunks: ['log'], template: path.resolve(__dirname, 'public/log.html') },
{ filename: 'growth.html', chunks: ['growth'], template: path.resolve(__dirname, 'public/growth.html') },
]),
{
module: {
rules: [
{
test: /\.mdx?$/,
use: [
{
loader: '@mdx-js/loader',
/** @type {import('@mdx-js/loader').Options} */
options: {},
},
],
},
{
test: /\.ya?ml$/,
type: 'asset/resource',
use: [
{
loader: 'yaml-loader',
options: {
asJSON: true,
},
},
],
},
],
},
entry,
output: {
clean: true,
path: path.resolve(__dirname, 'dist'),
filename: '[name].bundle.js',
publicPath: '/',
},
},
);