@bigbinary/neeto-commons-frontend 3.4.17 → 3.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,51 @@ const commonOptions = {
27
27
  devtool,
28
28
  resolve,
29
29
  optimization: {
30
+ runtimeChunk: "single",
30
31
  splitChunks: {
31
- maxSize: 15000000, // 15MB
32
+ chunks: "all",
33
+ maxInitialRequests: Infinity,
34
+ minSize: 5000, // 5kb uncompressed
35
+ cacheGroups: {
36
+ bigBinary: {
37
+ test: /[\\/]node_modules[\\/](?:@bigbinary)[\\/]/,
38
+ priority: 5,
39
+ name(module) {
40
+ const matches = module.context.match(
41
+ /[\\/]node_modules[\\/](?:@bigbinary)[\\/](.*?)([\\/]|$)/
42
+ );
43
+ const packageName = matches ? matches[1] : "bigbinary-main";
44
+
45
+ return `bigbinary-${packageName.replace("@", "")}`;
46
+ },
47
+ },
48
+ reactModules: {
49
+ test: /[\\/]node_modules[\\/]react.*[\\/]/,
50
+ name: "react-modules",
51
+ priority: 10,
52
+ },
53
+ antd: {
54
+ test: /[\\/]node_modules[\\/]antd[\\/]/,
55
+ name: "antd",
56
+ priority: 10,
57
+ },
58
+ recharts: {
59
+ test: /[\\/]node_modules[\\/]recharts[\\/]/,
60
+ name: "recharts",
61
+ priority: 10,
62
+ },
63
+ emojiMart: {
64
+ test: /[\\/]node_modules[\\/]emoji-mart[\\/]/,
65
+ name: "emoji-mart",
66
+ priority: 10,
67
+ },
68
+ npmCommon: {
69
+ test: /[\\/]node_modules[\\/](zustand|ramda|formik|dayjs|axios|classnames|dompurify|popper.js|yup|qs|zustand|framer-motion|lowlight|tippy.js)[\\/]/,
70
+ name: "npm-common",
71
+ priority: 10,
72
+ },
73
+ npmRest: { test: /[\\/]node_modules[\\/]/, name: "npm-rest" },
74
+ },
32
75
  },
33
76
  },
34
77
  module: { rules },
@@ -65,7 +65,7 @@ module.exports = (on, config) => {
65
65
  if (["chrome", "edge"].includes(browser.name) && browser.isHeadless) {
66
66
  launchOptions.args.push("--no-sandbox");
67
67
  launchOptions.args.push("--disable-gl-drawing-for-tests");
68
- launchOptions.args.push("--js-flags=--max-old-space-size=3500");
68
+ launchOptions.args.push("--js-flags=--max-old-space-size=5500");
69
69
  launchOptions.args.push("--disable-gpu");
70
70
  }
71
71
 
@@ -27,8 +27,51 @@ const commonOptions = {
27
27
  devtool,
28
28
  resolve,
29
29
  optimization: {
30
+ runtimeChunk: "single",
30
31
  splitChunks: {
31
- maxSize: 15000000, // 15MB
32
+ chunks: "all",
33
+ maxInitialRequests: Infinity,
34
+ minSize: 5000, // 5kb uncompressed
35
+ cacheGroups: {
36
+ bigBinary: {
37
+ test: /[\\/]node_modules[\\/](?:@bigbinary)[\\/]/,
38
+ priority: 5,
39
+ name(module) {
40
+ const matches = module.context.match(
41
+ /[\\/]node_modules[\\/](?:@bigbinary)[\\/](.*?)([\\/]|$)/
42
+ );
43
+ const packageName = matches ? matches[1] : "bigbinary-main";
44
+
45
+ return `bigbinary-${packageName.replace("@", "")}`;
46
+ },
47
+ },
48
+ reactModules: {
49
+ test: /[\\/]node_modules[\\/]react.*[\\/]/,
50
+ name: "react-modules",
51
+ priority: 10,
52
+ },
53
+ antd: {
54
+ test: /[\\/]node_modules[\\/]antd[\\/]/,
55
+ name: "antd",
56
+ priority: 10,
57
+ },
58
+ recharts: {
59
+ test: /[\\/]node_modules[\\/]recharts[\\/]/,
60
+ name: "recharts",
61
+ priority: 10,
62
+ },
63
+ emojiMart: {
64
+ test: /[\\/]node_modules[\\/]emoji-mart[\\/]/,
65
+ name: "emoji-mart",
66
+ priority: 10,
67
+ },
68
+ npmCommon: {
69
+ test: /[\\/]node_modules[\\/](zustand|ramda|formik|dayjs|axios|classnames|dompurify|popper.js|yup|qs|zustand|framer-motion|lowlight|tippy.js)[\\/]/,
70
+ name: "npm-common",
71
+ priority: 10,
72
+ },
73
+ npmRest: { test: /[\\/]node_modules[\\/]/, name: "npm-rest" },
74
+ },
32
75
  },
33
76
  },
34
77
  module: { rules },
@@ -65,7 +65,7 @@ module.exports = (on, config) => {
65
65
  if (["chrome", "edge"].includes(browser.name) && browser.isHeadless) {
66
66
  launchOptions.args.push("--no-sandbox");
67
67
  launchOptions.args.push("--disable-gl-drawing-for-tests");
68
- launchOptions.args.push("--js-flags=--max-old-space-size=3500");
68
+ launchOptions.args.push("--js-flags=--max-old-space-size=5500");
69
69
  launchOptions.args.push("--disable-gpu");
70
70
  }
71
71
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "3.4.17",
3
+ "version": "3.5.1",
4
4
  "description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
5
5
  "repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
6
6
  "author": "Amaljith K <amaljith.k@bigbinary.com>",