fab-spec / fab

💎 FAB project specification & monorepo
https://fab.dev
MIT License
578 stars 37 forks source link

[input-nextjs]: brings in dependencies excluded in next build #301

Open thejuan opened 4 years ago

thejuan commented 4 years ago

When enabling SSR dependencies can be brought into the server side package which aren't compatible with the FAB VM. These aren't actually needed server side so I can exclude them in the next build using

 webpack: (config, options) => {
    const { isServer } = options;
    if (isServer) {
      config.externals.push("aws-amplify");
    }
    return config;
  },

Despite not being anywhere in the next build, they still seem to get pulled into the FAB built code.

thejuan commented 3 years ago

Example repo https://github.com/Hatch-Team/fab-build-issues/tree/issues/301