Add electron min thread entry
This commit is contained in:
@@ -80,7 +80,11 @@ const Entry = () => ({
|
||||
ServiceRunner: {
|
||||
import: source("./Service/Runner.ts"),
|
||||
dependOn: ["Service"]
|
||||
}
|
||||
},
|
||||
|
||||
Electron: {
|
||||
import: source("./Electron/Electron.ts")
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
const { Entry, Output, resolve, TypeScriptRules } = require("./webpack.common");
|
||||
const nodeExternals = require("webpack-node-externals");
|
||||
|
||||
const AllEntry = Entry();
|
||||
|
||||
module.exports = (env) => {
|
||||
|
||||
const config = {
|
||||
|
||||
entry: {
|
||||
Electron: AllEntry.Electron,
|
||||
},
|
||||
|
||||
output: Output("[name].js"),
|
||||
devtool: 'source-map',
|
||||
mode: "development",
|
||||
resolve: resolve(),
|
||||
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
chunks: 'all',
|
||||
minSize: 1000
|
||||
}
|
||||
},
|
||||
|
||||
externals: [nodeExternals()],
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
TypeScriptRules()
|
||||
]
|
||||
},
|
||||
|
||||
node: {
|
||||
__filename: false,
|
||||
__dirname: false
|
||||
},
|
||||
|
||||
target: 'node'
|
||||
};
|
||||
|
||||
return config;
|
||||
};
|
||||
Reference in New Issue
Block a user