Closed jpedroschmitz closed 11 months ago
Latest commit: ad143ae81bb1d35346f5cf4667bf6c2726f77e66
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
How about adding a browser
file that exports this instead – like react-dom/server
is only for server – to make it more explicit? cuz reading htmlToSlateASTSync
doesn't convey that it's browser exclusive.
How about adding a
browser
file that exports this instead – likereact-dom/server
is only for server – to make it more explicit? cuz readinghtmlToSlateASTSync
doesn't convey that it's browser exclusive.
I tried to make it work like this, but no luck. When using exports
it works, but then breaks TypeScript in the application unless I change the tsconfig moduleResolution to nodenext, which then breaks a bunch of other things 🫠
I'll export everything from the root as there are no errors on the server for polyfilling jsdom functions now.
Sounds great. I'll document this internally and create a ticket so we can move away from tsdx completely. @anmolarora1
It adds
htmlToSlateASTSync
, which doesn't depend on jsdom and will work exclusively on the browser environment.