@asaleh37/ui-base 1.2.14 → 1.2.15

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.2.14",
3
+ "version": "1.2.15",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -0,0 +1,4 @@
1
+ // src/global-shim.ts
2
+ if (typeof global === 'undefined') {
3
+ (globalThis as any).global = globalThis;
4
+ }
package/vite.config.ts CHANGED
@@ -6,9 +6,9 @@ import inject from "@rollup/plugin-inject";
6
6
  // https://vite.dev/config/
7
7
  export default defineConfig({
8
8
  plugins: [react()],
9
- // define: {
10
- // global: 'globalThis', // Fix for global
11
- // },
9
+ define: {
10
+ global: "globalThis", // Fix for global
11
+ },
12
12
  optimizeDeps: {
13
13
  include: ["fbjs"],
14
14
  },
@@ -17,7 +17,7 @@ export default defineConfig({
17
17
  plugins: [
18
18
  rollupNodePolyFill(),
19
19
  inject({
20
- global: ["globalthis", "globalThis"], // This injects `global = globalThis`
20
+ global: [require.resolve("./src/global-shim"), "global"], // Inject our shim
21
21
  }),
22
22
  ],
23
23
  },