diff --git a/config/webpack.common.js b/config/webpack.common.js index ea9dc4b..16688f4 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -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"] } }); diff --git a/config/webpack.lab.js b/config/webpack.lab.js index 2ecd385..73f450e 100644 --- a/config/webpack.lab.js +++ b/config/webpack.lab.js @@ -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 } }, diff --git a/package.json b/package.json index 417cef3..131b7ab 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "./source/LivingTogether.ts", "scripts": { "clean": "rimraf ./build/*", - "lab": "webpack serve --open --config ./config/webpack.lab.js", + "hmr-lab": "webpack serve --open --config ./config/webpack.lab.js", "build-lab": "npm run clean & webpack --mode development --config ./config/webpack.lab.js", "release-lab": "npm run clean & webpack --mode production --no-devtool --config ./config/webpack.lab.js" },