@glowlabs-org/utils 0.2.1 → 0.2.2

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": "@glowlabs-org/utils",
3
- "version": "0.2.01",
3
+ "version": "0.2.02",
4
4
  "description": "A library containing all typechain types and addresses relating to the glow guarded launch",
5
5
  "keywords": [],
6
6
  "author": "",
@@ -9,6 +9,20 @@
9
9
  "main": "dist/cjs/index.js",
10
10
  "module": "dist/esm/index.js",
11
11
  "types": "dist/esm/index.d.ts",
12
+ "browser": "dist/esm/browser.js",
13
+ "exports": {
14
+ "./package.json": "./package.json",
15
+ ".": {
16
+ "require": "./dist/cjs/index.js",
17
+ "import": "./dist/esm/index.js",
18
+ "types": "./dist/esm/index.d.ts"
19
+ },
20
+ "./browser": {
21
+ "require": "./dist/cjs/browser.js",
22
+ "import": "./dist/esm/browser.js",
23
+ "types": "./dist/esm/browser.d.ts"
24
+ }
25
+ },
12
26
  "publishConfig": {
13
27
  "access": "public"
14
28
  },
package/rollup.config.js CHANGED
@@ -5,15 +5,22 @@ import peerDepsExternal from "rollup-plugin-peer-deps-external";
5
5
  import json from "@rollup/plugin-json";
6
6
 
7
7
  export default {
8
- input: "src/index.ts", // Adjust to your entry point
8
+ // Build both Node (index) and browser-safe (browser) entry points
9
+ input: {
10
+ index: "src/index.ts",
11
+ browser: "src/browser.ts",
12
+ },
9
13
  output: [
10
14
  {
11
- file: "dist/cjs/index.js",
15
+ dir: "dist/cjs",
16
+ entryFileNames: "[name].js",
12
17
  format: "cjs",
13
18
  sourcemap: true,
19
+ exports: "named",
14
20
  },
15
21
  {
16
- file: "dist/esm/index.js",
22
+ dir: "dist/esm",
23
+ entryFileNames: "[name].js",
17
24
  format: "esm",
18
25
  sourcemap: true,
19
26
  },