JiLiZART / BBob

⚡️Blazing fast js bbcode parser, that transforms and parses bbcode to AST with plugin support in pure javascript, no dependencies
https://codepen.io/JiLiZART/full/vzMvpd
MIT License
161 stars 19 forks source link

Error after upgrading to latest version in React: presetHTML5.extend is not a function #214

Open JiLiZART opened 8 months ago

JiLiZART commented 8 months ago

Discussed in https://github.com/JiLiZART/BBob/discussions/213

Originally posted by **bmt2604** January 5, 2024 Hello, I upgraded the package version of @bbob/react and @bbob/preset-react from 2.9.0 to 3.0.2 in my React application and started seeing this error: `TypeError: presetHTML5.extend is not a function`. I was previously importing from the package like so: ``` import BBCode from '@bbob/react'; import presetReact from '@bbob/preset-react'; ``` but have found that since upgrading, the only way I've found to fix the error is to include `/lib` in the import path: ``` import BBCode from '@bbob/react/lib'; import presetReact from '@bbob/preset-react/lib'; ``` Is this an expected change to have to make when using the latest version?
petrvecera commented 5 months ago

Same issue, looking forward to the fix 👍

BadiiBoukalane commented 4 months ago

Same Issue

JiLiZART commented 2 months ago

@petrvecera @BadiiBoukalane can you please share your vite/webpack configs or what build system you use? If you use type: module in package.json so currently this package don't support esm format

petrvecera commented 2 months ago

Here is the code how I am using it in my app https://github.com/cohstats/coh3-stats/blob/4e6b5de72f59538a9a2b35d1ff7773a8d7bf84bf/screens/news/index.tsx#L6

I am using it in NextJS app https://github.com/cohstats/coh3-stats/blob/master/package.json

Btw thank you for your great lib 🙏