|
@@ -171,9 +171,19 @@ module.exports = (env, options) => {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
mode: options.mode,
|
|
mode: options.mode,
|
|
- entry: ["./base/src/index.ts"],
|
|
|
|
|
|
+ target: "web",
|
|
|
|
+ entry: {
|
|
|
|
+ "default": "./base/src/index.ts",
|
|
|
|
+ "preview": "./base/src/index-preview.ts",
|
|
|
|
+ },
|
|
output: {
|
|
output: {
|
|
- filename: "taipy-gui-base.js",
|
|
|
|
|
|
+ filename: (arg) => {
|
|
|
|
+ if (arg.chunk.name === "default") {
|
|
|
|
+ return "taipy-gui-base.js";
|
|
|
|
+ }
|
|
|
|
+ return "[name].taipy-gui-base.js";
|
|
|
|
+ },
|
|
|
|
+ chunkFilename: "[name].taipy-gui-base.js",
|
|
path: webAppPath,
|
|
path: webAppPath,
|
|
globalObject: "this",
|
|
globalObject: "this",
|
|
library: {
|
|
library: {
|
|
@@ -181,11 +191,11 @@ module.exports = (env, options) => {
|
|
type: "umd",
|
|
type: "umd",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- plugins: [
|
|
|
|
- new webpack.optimize.LimitChunkCountPlugin({
|
|
|
|
- maxChunks: 1,
|
|
|
|
- }),
|
|
|
|
- ],
|
|
|
|
|
|
+ optimization: {
|
|
|
|
+ splitChunks: {
|
|
|
|
+ chunks: 'all',
|
|
|
|
+ },
|
|
|
|
+ },
|
|
module: {
|
|
module: {
|
|
rules: [
|
|
rules: [
|
|
{
|
|
{
|