fix
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ export {
|
||||
R as Responses
|
||||
}
|
||||
|
||||
export class Backend{
|
||||
export class Server{
|
||||
private ws = http.createServer()
|
||||
private io = bsock.createServer()
|
||||
|
||||
|
||||
+5
-1
@@ -3,11 +3,15 @@
|
||||
var bsock = require('bsock')
|
||||
|
||||
import * as T from './Types';
|
||||
import * as U from './Utils';
|
||||
import * as I from './Interfaces';
|
||||
import * as R from './Responses';
|
||||
|
||||
export {
|
||||
T as Types,
|
||||
U as Utils,
|
||||
I as Interfaces,
|
||||
R as Responses
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +20,7 @@ function stripAfterEquals(str:string){
|
||||
return str.split("=")[0]
|
||||
}
|
||||
|
||||
export class Frontend implements I.Socket{
|
||||
export class Client implements I.Socket{
|
||||
|
||||
private socket: I.Socket
|
||||
constructor(public port:number, private server: string, private tls: boolean = false){
|
||||
|
||||
+22
-42
@@ -1,13 +1,11 @@
|
||||
const path = require('path');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
|
||||
const frontendConf = {
|
||||
mode: 'production',
|
||||
target: "web",
|
||||
entry: path.resolve(__dirname, 'src', 'Frontend.ts'),
|
||||
entry: path.resolve(__dirname, 'Frontend.ts'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'lib'),
|
||||
path: path.resolve(__dirname, '..'),
|
||||
filename: "Frontend.js",
|
||||
libraryTarget: 'commonjs',
|
||||
},
|
||||
@@ -21,47 +19,29 @@ const frontendConf = {
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
exclude: [
|
||||
/\.\/(.*)\/.ts/,
|
||||
/\.\/(.*).ts/,
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
}
|
||||
|
||||
const backendConf = {
|
||||
mode: 'production',
|
||||
target: "node",
|
||||
entry: path.resolve(__dirname, 'src', 'Backend.ts'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'lib'),
|
||||
filename: "Backend.js",
|
||||
libraryTarget: 'commonjs',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"]
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
exclude: [
|
||||
/\.\/(.*)\/.ts/,
|
||||
/\.\/(.*).ts/,
|
||||
],
|
||||
}),
|
||||
],
|
||||
},
|
||||
mode: 'production',
|
||||
target: "node",
|
||||
entry: path.resolve(__dirname, 'Backend.ts'),
|
||||
output: {
|
||||
path: path.resolve(__dirname, '..'),
|
||||
filename: "Backend.js",
|
||||
libraryTarget: 'commonjs'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{ test: /\.ts?$/, loader: "ts-loader" }
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".tsx", ".js"]
|
||||
},
|
||||
optimization: {
|
||||
minimize: false,
|
||||
},
|
||||
}
|
||||
|
||||
module.exports = [frontendConf, backendConf]
|
||||
module.exports = [backendConf, frontendConf]
|
||||
|
||||
Reference in New Issue
Block a user