BBob icon indicating copy to clipboard operation
BBob copied to clipboard

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

Open JiLiZART opened this issue 1 year ago • 4 comments

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?

JiLiZART avatar Jan 08 '24 10:01 JiLiZART

Same issue, looking forward to the fix 👍

petrvecera avatar Apr 06 '24 15:04 petrvecera

Same Issue

BadiiBoukalane avatar Apr 11 '24 08:04 BadiiBoukalane

@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

JiLiZART avatar Jun 25 '24 20:06 JiLiZART

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 🙏

petrvecera avatar Jun 26 '24 08:06 petrvecera