Files
nym/nym-connect/mobile/webpack.common.js
T
Pierre Dommerc ae56d3685c refactor(nym-connect): new file structure (#3082)
* refactor(nc-android): move nc android into mobile/nym-connect

rename the android app ID to "nym_connect"

* chore(nc-mobile): restore dist directory

* fix: typo

* chore: restore gitkeep

* chore: track Cargo.lock

* ci: trigger ts lint workflow on pull request

* refactor(nym-connect): new structure

move temp mobile version under nym-connect-new/mobile

* refactor(nym-connect): new structure

move temp desktop version under nym-connect-new/desktop

* refactor(nym-connect): new structure

rename nym-connect-new to nym-connect

* refactor(nym-connect): new structure

restore lost .gitkeep

* refactor(nym-connect): new structure

restore lost .gitkeep

* fix(nym-connect-desktop): broken relative paths

* fix(nym-connect-mobile): add todo comment about broken deps

* ci(nym-connect): fix relative paths

* ci(nym-connect): rename workflow
2023-02-22 17:01:46 +01:00

56 lines
1.1 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'),
};
module.exports = mergeWithRules({
module: {
rules: {
test: 'match',
use: 'replace',
},
},
})(
webpackCommon(__dirname, [
{ filename: 'index.html', chunks: ['app'], template: path.resolve(__dirname, 'public/index.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: '/',
},
},
);