mono/packages/xblox/webpack.config.js
2026-04-07 19:28:35 +02:00

33 lines
760 B
JavaScript

import path from 'path';
import { fileURLToPath } from 'url';
import webpack from 'webpack';
const __dirname = fileURLToPath(new URL('.', import.meta.url));
export default {
devtool: false,
plugins: [
new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
],
entry: './dist-in/main.js',
target: 'node',
mode: 'production',
module: {
rules: [],
},
optimization: {
minimize: false,
// Entry is `export * from './index.js'`; without this, production tree-shaking
// removes the whole graph and emits an empty bundle.
usedExports: false,
},
resolve: {
extensions: ['.js', '.ts'],
},
output: {
filename: 'main_node.js',
path: path.resolve(__dirname, 'dist'),
},
externals: {},
};