Skip to content

Commit

Permalink
fix: correctly export it from /client
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedroschmitz committed Dec 5, 2023
1 parent f747840 commit 0d77c96
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
15 changes: 12 additions & 3 deletions packages/html-to-slate-ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,23 @@
"url": "git+https://github.com/hygraph/rich-text.git",
"directory": "packages/html-to-slate-ast"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"README.md",
"LICENSE.md",
"dist"
],
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./client": {
"require": "./dist/client/index.js",
"import": "./dist/client/index.mjs",
"types": "./dist/client/index.d.ts"
}
},
"jest": {},
"dependencies": {
"@braintree/sanitize-url": "^6.0.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Descendant } from 'slate';
import { normalizeHtml } from './normalizeHtml';
import { deserialize } from './deserialize';
import { normalizeHtml } from '../normalizeHtml';
import { deserialize } from '../deserialize';

const parseDomDocumentSync = (normalizedHTML: string) => {
return new DOMParser().parseFromString(normalizedHTML, 'text/html');
Expand Down
3 changes: 2 additions & 1 deletion packages/html-to-slate-ast/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { defineConfig } from 'tsup';

export default defineConfig(options => ({
entry: ['src/index.ts', 'src/client.ts'],
entry: ['src/index.ts', 'src/client'],
tsconfig: 'tsconfig.build.json',
minify: !options.watch,
splitting: true,
sourcemap: true,
dts: true,
treeshake: true,
Expand Down

0 comments on commit 0d77c96

Please sign in to comment.