BuilderIO / hydration-overlay

Overlay for hydration errors with explicit diff between renders.
https://www.builder.io/blog/announcing-react-hydration-overlay
MIT License
500 stars 17 forks source link

Gives a module error #20

Closed malikozturkk closed 11 months ago

malikozturkk commented 11 months ago

It didn't work with both Webpack and plain config. next.config.js webpack: (config, options) => { config = withHydrationOverlayWebpack({ appRootSelector: "#__next", isMainAppEntryPoint: (entryPointName) => !options.isServer && (entryPointName === "pages/_app" || entryPointName === "main-app"), })(config); return config; },

_app.tsx

Screenshot 2023-12-21 at 11 16 28

saadshahd commented 11 months ago

Fixed by adding @builder.io/react-hydration-overlay to next.config transpilePackages

transpilePackages: ['@builder.io/react-hydration-overlay'],
BenjaminLesne commented 11 months ago

@saadshahd nice! it got rid of the server error.

But I don't have the HTML diff showing up still. Am I the only one?

malikozturkk commented 11 months ago

Fixed by adding @builder.io/react-hydration-overlay to next.config transpilePackages

transpilePackages: ['@builder.io/react-hydration-overlay'],

Thanks, I'm trying

malikozturkk commented 11 months ago

Fixed by adding @builder.io/react-hydration-overlay to next.config transpilePackages

transpilePackages: ['@builder.io/react-hydration-overlay'],

Thanks!!

it worked