12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- const { IgnorePlugin } = require('webpack');
- const CopyWebpackPlugin = require('copy-webpack-plugin');
- const path = require('path');
- module.exports = {
- entry: './src/app.ts',
- module: {
- rules: [
- {
- test: /\.tsx?$/,
- use: 'ts-loader',
- exclude: /node_modules/,
- },
- ],
- },
- resolve: {
- extensions: ['.js', '.tsx', '.ts', ],
- alias: {
- "@src": path.resolve(__dirname, "src"),
- "@root": path.resolve(__dirname, "../"),
- "@classes": path.resolve(__dirname, "../base-lib/src/classes/"),
- "@core": path.resolve(__dirname, "../base-lib/src/core/"),
- "@util": path.resolve(__dirname, "../base-lib/src/util/"),
- "@core-models": path.resolve(__dirname, "../base-lib/src/core-models/"),
- "@core-guards": path.resolve(__dirname, "../base-lib/src/core-guards/")
- }
- },
- target: 'node',
- externals:{
- "fs": "commonjs fs",
- "net": "commonjs net",
- "pg": "commonjs pg"
- },
- plugins: [
- new IgnorePlugin({
- resourceRegExp: /^pg-native$/,
- }),
- new CopyWebpackPlugin({
- patterns: [
- {from: 'config.json'},
- {from: 'proxy.json'},
- ]
- })
- ],
- output: {
- filename: 'index.js',
- path: path.resolve(__dirname, '../__dist/pmr-api-gateway'),
- },
- optimization: {
- minimize: false
- }
- };
|