1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- const path = require('path');
-
- const frontendConf = {
- mode: 'production',
- target: "web",
- entry: path.resolve(__dirname, 'TestFrontend.ts'),
- output: {
- path: path.resolve(__dirname, '..'),
- filename: "TestFrontend.js",
- libraryTarget: 'commonjs',
- },
- module: {
- rules: [
- { test: /\.ts?$/, loader: "ts-loader" }
- ]
- },
- resolve: {
- extensions: [".ts", ".tsx", ".js"]
- },
- optimization: {
- minimize: true,
- },
- }
-
- const backendConf = {
- mode: 'production',
- target: "node",
- entry: path.resolve(__dirname, 'TestBackend.ts'),
- output: {
- path: path.resolve(__dirname, '..'),
- filename: "TestBackend.js",
- libraryTarget: 'commonjs',
- },
- module: {
- rules: [
- { test: /\.ts?$/, loader: "ts-loader" }
- ]
- },
- resolve: {
- extensions: [".ts", ".tsx", ".js"]
- },
- optimization: {
- minimize: false,
- },
- }
-
- module.exports = [backendConf, frontendConf]
|