@asaleh37/ui-base 1.2.13 → 1.2.14

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vite.config.ts +10 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "1.2.13",
3
+ "version": "1.2.14",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
package/vite.config.ts CHANGED
@@ -1,31 +1,25 @@
1
1
  import { defineConfig } from "vite";
2
2
  import react from "@vitejs/plugin-react";
3
3
  import rollupNodePolyFill from "rollup-plugin-polyfill-node";
4
- import tsconfigPaths from "vite-tsconfig-paths";
5
- import path from "path";
4
+ import inject from "@rollup/plugin-inject";
6
5
 
7
6
  // https://vite.dev/config/
8
7
  export default defineConfig({
9
8
  plugins: [react()],
10
- define: {
11
- global: "globalThis", // Fix for global
12
- },
9
+ // define: {
10
+ // global: 'globalThis', // Fix for global
11
+ // },
13
12
  optimizeDeps: {
14
13
  include: ["fbjs"],
15
14
  },
16
15
  build: {
17
- lib: {
18
- entry: path.resolve(__dirname, "src/index.ts"),
19
- },
20
16
  rollupOptions: {
21
- external: ["react", "react-dom"], // 👈 keep react peer
22
- plugins: [rollupNodePolyFill()],
23
- output: {
24
- globals: {
25
- react: "React",
26
- "react-dom": "ReactDOM",
27
- },
28
- },
17
+ plugins: [
18
+ rollupNodePolyFill(),
19
+ inject({
20
+ global: ["globalthis", "globalThis"], // This injects `global = globalThis`
21
+ }),
22
+ ],
29
23
  },
30
24
  },
31
25
  server: {