Make server script work

This commit is contained in:
schmelczerandras 2020-10-16 23:38:56 +02:00
parent e2129bbb26
commit f7e7522379
2 changed files with 3 additions and 1 deletions

View file

@ -3,7 +3,7 @@
"description": "Game server for decla.red", "description": "Game server for decla.red",
"keywords": [], "keywords": [],
"author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)", "author": "András Schmelczer <andras@schmelczer.dev> (https://schmelczer.dev/)",
"version": "0.0.1", "version": "0.0.1-try2",
"main": "dist/main.js", "main": "dist/main.js",
"scripts": { "scripts": {
"build": "npx webpack --mode production", "build": "npx webpack --mode production",

View file

@ -3,6 +3,7 @@ const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const nodeExternals = require('webpack-node-externals'); const nodeExternals = require('webpack-node-externals');
const { ESBuildPlugin } = require('esbuild-loader'); const { ESBuildPlugin } = require('esbuild-loader');
const TerserJSPlugin = require('terser-webpack-plugin'); const TerserJSPlugin = require('terser-webpack-plugin');
const webpack = require('webpack');
const PATHS = { const PATHS = {
entryPoint: path.resolve(__dirname, 'src/main.ts'), entryPoint: path.resolve(__dirname, 'src/main.ts'),
@ -41,6 +42,7 @@ module.exports = (env, argv) => ({
], ],
}, },
plugins: [ plugins: [
new webpack.BannerPlugin({ banner: '#!/usr/bin/env node', raw: true }),
new ESBuildPlugin(), new ESBuildPlugin(),
new CleanWebpackPlugin({ new CleanWebpackPlugin({
protectWebpackAssets: false, protectWebpackAssets: false,