Create backend server

This commit is contained in:
2022-04-15 00:16:00 +08:00
parent eccd7fdf7c
commit 3220764677
7 changed files with 255 additions and 176 deletions
+9
View File
@@ -70,6 +70,15 @@ const Entry = () => ({
SimulatorWeb: {
import: source("./Page/SimulatorWeb/SimulatorWeb.tsx"),
dependOn: ["Model", "GLRender"]
},
Service: {
import: source("./Service/Service.ts")
},
ServiceRunner: {
import: source("./Service/Runner.ts"),
dependOn: ["Service"]
}
});
+41
View File
@@ -0,0 +1,41 @@
const { Entry, Output, resolve, TypeScriptRules } = require("./webpack.common");
const AllEntry = Entry();
module.exports = (env) => {
const config = {
entry: {
Service: AllEntry.Service,
ServiceRunner: AllEntry.ServiceRunner,
},
output: Output("[name].js"),
devtool: 'source-map',
mode: "development",
resolve: resolve(),
optimization: {
splitChunks: {
chunks: 'all',
minSize: 1000
}
},
module: {
rules: [
TypeScriptRules()
]
},
node: {
__filename: false,
__dirname: false
},
target: 'node'
};
return config;
};