Skip to content

Commit

Permalink
dexie-react-hooks: improved vite experience.
Browse files Browse the repository at this point in the history
We now export esm bundles in the exports field.
Needed to rename index to dexie-react-hooks to make typings work after adding the exports fields.
  • Loading branch information
dfahlander committed Oct 30, 2023
1 parent 437b697 commit 3ff7d50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions libs/dexie-react-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
{
"name": "dexie-react-hooks",
"version": "1.1.6",
"version": "1.1.7",
"description": "React hooks for reactive data fetching using Dexie.js",
"main": "dist/dexie-react-hooks.js",
"typings": "dist/index.d.ts",
"typings": "dist/dexie-react-hooks.d.ts",
"scripts": {
"test": "just-build build-tests && just-build run-tests",
"build": "just-build"
},
"exports": {
"import": "./dist/dexie-react-hooks.mjs",
"require": "./dist/dexie-react-hooks.js",
"default": "./dist/dexie-react-hooks.js"
},
"just-build": {
"default": [
"rollup -c rollup.config.js",
Expand Down
2 changes: 1 addition & 1 deletion libs/dexie-react-hooks/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const ERRORS_TO_IGNORE = [
];

export default {
input: './src/index.ts',
input: './src/dexie-react-hooks.ts',
output: [{
file: 'dist/dexie-react-hooks.js',
format: 'umd',
Expand Down
File renamed without changes.

0 comments on commit 3ff7d50

Please sign in to comment.