From d26988f5bbd147ef230676446e687eb527a7d7ad Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 6 Apr 2023 08:56:56 +0530 Subject: Added "Download PDF" button to khatian information. --- config/webpack.config.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'config/webpack.config.js') diff --git a/config/webpack.config.js b/config/webpack.config.js index 15cae74..629a373 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -1,5 +1,6 @@ const path = require("path"); const fs = require("fs"); +const webpack = require("webpack"); const { merge } = require("webpack-merge"); const CopyPlugin = require("copy-webpack-plugin"); @@ -75,6 +76,7 @@ for (const sharedModule of sharedModules) { const commonOptions = { mode: "production", + target: "web", resolve: { extensions: [".ts", ".js"], alias: { @@ -93,11 +95,17 @@ const commonOptions = { ] }, optimization: { - minimize: process.env.NODE_ENV === "production" + minimize: process.env.NODE_ENV === "production", + runtimeChunk: false }, output: { iife: true - } + }, + plugins: [ + new webpack.optimize.LimitChunkCountPlugin({ + maxChunks: 1 + }) + ] }; const sharedModuleOptions = { @@ -106,7 +114,7 @@ const sharedModuleOptions = { module: { rules: [ { - test: /\.(j|t)s$/, + test: /banglar-bhumi-utils\/src\/.*.(^.?|\.[^d]|[^.]d|[^.][^d])\.(t|j)s$/, loader: path.resolve(CONFIG_DIR, "webpack/loader/count-imports-loader.js"), options: { sharedModulesImportedCount @@ -114,7 +122,7 @@ const sharedModuleOptions = { enforce: "post" } ] - }, + } }; const uninjectedScriptConfiguration = merge( @@ -170,7 +178,7 @@ const sharedModulesConfiguration = merge( module: { rules: [ { - test: /\.(j|t)s$/, + test: /banglar-bhumi-utils\/src\/.*.(^.?|\.[^d]|[^.]d|[^.][^d])\.(t|j)s$/, loader: path.resolve(CONFIG_DIR, "webpack/loader/arrange-shared-module-loader.js"), options: { sortedSharedModules -- cgit v1.2.3