Optimizing webpack packaging
This commit is contained in:
@@ -54,14 +54,17 @@ const Entry = () => ({
|
||||
import: source("./Model/Model.ts")
|
||||
},
|
||||
|
||||
GLRender: {
|
||||
import: source("./GLRender/ClassicRenderer.ts")
|
||||
},
|
||||
|
||||
livingTogether: {
|
||||
import: source("./livingTogether.ts"),
|
||||
dependOn: "Model",
|
||||
import: source("./livingTogether.ts")
|
||||
},
|
||||
|
||||
LaboratoryPage: {
|
||||
import: source("./Page/Laboratory/Laboratory.tsx"),
|
||||
dependOn: "Model",
|
||||
dependOn: ["Model", "GLRender"]
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ module.exports = (env) => {
|
||||
const config = {
|
||||
|
||||
entry: {
|
||||
GLRender: AllEntry.GLRender,
|
||||
Model: AllEntry.Model,
|
||||
LaboratoryPage: AllEntry.LaboratoryPage
|
||||
},
|
||||
@@ -21,10 +22,12 @@ module.exports = (env) => {
|
||||
resolve: resolve(),
|
||||
|
||||
optimization: {
|
||||
runtimeChunk: 'single',
|
||||
chunkIds: 'named',
|
||||
moduleIds: 'named',
|
||||
splitChunks: {
|
||||
minSize: 1000,
|
||||
chunks: 'all',
|
||||
minSize: 1000
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user