Is there a way to host pages without on next.js apps without next.js hydration scripts?

I have next.js app with large codebase, big redux store and heavy pages with lot of dynamic content.
I want build lightweight page on builder io and integrate into existing next.js project. I followed official integration guide and I noticed that all code that inside of _app.js loaded on my new builder page.
Are there any way to keep only code?

I even tried to load dynamically my bootstrap code into _app.js file but no luck, page weight stays the same - 7Mb.

My _app.js code with dynamic import:

import dynamic from 'next/dynamic'

const RootApp = dynamic(() => import('containers/RootApp'))
const builderPages = ['/landing/']

const _App = ({ Component, pageProps }) => {
  if (typeof window !== 'undefined' && builderPages.includes(location?.pathname)) {
    return <Component {...pageProps} />

  return <RootApp component={Component} pageProps={pageProps} />

export default _App

Looks forum is dead…

Builder integrates with React, or any other framework you may be using. Builder has no control over your side of the application only over what we serve.

So the answer is that yes, Builder code can be lightweight, but because we don’t control your application into which builder is embedded or know how your application is structured it is hard for us to provide concrete steps to solve your problem.

1 Like