decla-red/shared/webpack.config.js
Andras Schmelczer 93a7fe01ab
All checks were successful
Build & deploy / Build & deploy website (push) Successful in 32s
Build & deploy / Build & publish server image (push) Successful in 1m2s
Improve netcode and simplify (#4)
- Simplify the logic wherever possible to remove overengineering and simplify the netcode
- Actually improve the netcode
- The new lines are mainly the package locks and tests

Reviewed-on: https://home.schmelczer.dev/git/andras/decla-red/pulls/4
2026-09-15 07:57:57 +01:00

44 lines
805 B
JavaScript

const path = require('path');
const PATHS = {
entryPoint: path.resolve(__dirname, 'src/main.ts'),
bundles: path.resolve(__dirname, 'lib'),
};
module.exports = (env, argv) => ({
entry: {
main: PATHS.entryPoint,
},
target: 'node',
output: {
filename: '[name].js',
path: PATHS.bundles,
libraryTarget: 'umd',
umdNamedDefine: true,
},
devtool: argv.mode === 'development' ? 'source-map' : false,
watchOptions: {
poll: true,
ignored: /node_modules/,
},
externals: {
'gl-matrix': 'gl-matrix',
},
optimization: {
minimize: false,
},
module: {
rules: [
{
test: /\.ts$/,
use: {
loader: 'ts-loader',
},
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.ts'],
},
});