@bigbinary/neeto-commons-frontend 4.13.7 → 4.13.9

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.
@@ -86,6 +86,7 @@ const config = {
86
86
  "process.env.NODE_DEBUG": "'development'",
87
87
  ...createDefinitions(process),
88
88
  "process.env": "{}",
89
+ global: {},
89
90
  },
90
91
  };
91
92
 
@@ -4,6 +4,7 @@ const { default: react } = require("@vitejs/plugin-react");
4
4
  const dotenv = require("dotenv");
5
5
 
6
6
  const { prevalPlugin } = require("./plugins/preval.js");
7
+ const { reactGiphyPlugin } = require("./plugins/reactGiphy.js");
7
8
  const svgr = require("./plugins/svgr.js");
8
9
  const { virtualizedPlugin } = require("./plugins/virtualized.js");
9
10
 
@@ -23,6 +24,7 @@ const config = {
23
24
  svgr(),
24
25
  react({ babel: VITE_BABEL_CONFIG }),
25
26
  virtualizedPlugin(),
27
+ reactGiphyPlugin(),
26
28
  prevalPlugin(),
27
29
  viteYaml(),
28
30
  ],
@@ -39,11 +41,7 @@ const config = {
39
41
  define: esbuildConfig.define,
40
42
  root: "app/javascript/packs",
41
43
  optimizeDeps: {
42
- include: [
43
- "@bigbinary/neeto-icons/typeface-logos",
44
- "zustand/shallow",
45
- "public-ip",
46
- ],
44
+ include: ["@bigbinary/neeto-icons/typeface-logos", "zustand/shallow"],
47
45
  },
48
46
  };
49
47
 
@@ -0,0 +1,21 @@
1
+ /* eslint-disable @bigbinary/neeto/no-dangling-constants */
2
+
3
+ const fs = require("fs");
4
+
5
+ const WRONG_CODE = /^if\s\(module\.hot\)[\s\S]+/gm;
6
+
7
+ const reactGiphyPlugin = () => ({
8
+ name: "react-giphy-searchbox",
9
+ configResolved() {
10
+ try {
11
+ const file = require.resolve(
12
+ "react-giphy-searchbox/es/style/useStyle.js"
13
+ );
14
+ const code = fs.readFileSync(file, "utf-8");
15
+ const modified = code.replace(WRONG_CODE, "");
16
+ fs.writeFileSync(file, modified);
17
+ } catch {}
18
+ },
19
+ });
20
+
21
+ module.exports = { reactGiphyPlugin };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-commons-frontend",
3
- "version": "4.13.7",
3
+ "version": "4.13.9",
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>",
@@ -146,7 +146,7 @@
146
146
  "cypress": "11.2.0",
147
147
  "dayjs": "1.11.10",
148
148
  "dompurify": "^2.4.0",
149
- "esbuild": "^0.24.0",
149
+ "esbuild": "0.24.0",
150
150
  "esbuild-plugin-svgr": "^3.1.0",
151
151
  "esbuild-plugin-yaml": "^0.0.1",
152
152
  "esbuild-plugins-node-modules-polyfill": "^1.6.8",
@@ -241,7 +241,7 @@
241
241
  "dayjs": "1.11.10",
242
242
  "dompurify": "^2.4.0",
243
243
  "dotenv-webpack": "^8.0.1",
244
- "esbuild": "^0.24.0",
244
+ "esbuild": "0.24.0",
245
245
  "esbuild-plugin-svgr": "^3.1.0",
246
246
  "esbuild-plugins-node-modules-polyfill": "^1.6.8",
247
247
  "esbuild-rails": "^1.0.7",