Skip to content

Commit

Permalink
Merge pull request #14 from purduehackers/fix-exports
Browse files Browse the repository at this point in the history
Fix `@purduehackers/time/react` exports
  • Loading branch information
MatthewStanciu authored Nov 16, 2023
2 parents 6063f4e + b7e1b40 commit 3a18c82
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
13 changes: 0 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,3 @@ export default function MyComponent() {
return <p>{lightningTimeClock}</p>
}
```

If you're using TypeScript, the `react` sub-package requires you to use `"moduleResolution": "Bundler"` in your tsconfig:

```json
// tsconfig.json
{
"compilerOptions": {
...
"module": "ES2020",
"moduleResolution": "Bundler",
}
}
```
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@purduehackers/time",
"version": "0.6.3",
"version": "0.6.4",
"description": "convert between traditional time and lightning time ⚡️",
"main": "dist/index.js",
"module": "dist/esm/index.js",
Expand All @@ -12,9 +12,9 @@
"require": "./dist/index.js"
},
"./react": {
"types": "./dist/react/index.d.ts",
"import": "./dist/esm/react/index.js",
"require": "./dist/react/index.js"
"types": "./dist/react.d.ts",
"import": "./dist/esm/react.js",
"require": "./dist/react.js"
}
},
"scripts": {
Expand Down
8 changes: 8 additions & 0 deletions react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "@purduehackers/time/react",
"type": "module",
"main": "../dist/react.js",
"module": "../dist/esm/react.js",
"types": "../dist/react.d.ts",
"sideEffects": false
}

0 comments on commit 3a18c82

Please sign in to comment.