@bigbinary/neeto-commons-frontend 4.13.8 → 4.13.10

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,7 +86,7 @@ const config = {
86
86
  "process.env.NODE_DEBUG": "'development'",
87
87
  ...createDefinitions(process),
88
88
  "process.env": "{}",
89
- global: {},
89
+ global: "{}",
90
90
  },
91
91
  };
92
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.8",
3
+ "version": "4.13.10",
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>",