analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.59k stars 250 forks source link

fix(platform): add support for @ng-web-apis and @taiga-ui deps w/SSR #1357

Closed brandonroberts closed 1 month ago

brandonroberts commented 1 month ago

PR Checklist

Related to https://github.com/taiga-family/taiga-ui/issues/9085

What is the new behavior?

When using @ng-web-apis or @taiga-ui packages, no errors are thrown when using SSR. Our dependency crawler plugin doesn't account for peer dependencies inside top-level packages, so some of the packages were not being transformed for Angular compilation.

Manually this was fixed by adding those orgs to the ssr.noExternal array in the vite.config.ts

    ssr: {
      noExternal: [
        '@analogjs/trpc',
        '@trpc/server',
        '@ng-web-apis/**', // <-- transform all `@ng-web-apis` sub-packages
        '@taiga-ui/**',  // <-- transform all `@taiga-ui` sub-packages
      ],
    },

Does this PR introduce a breaking change?

Other information

[optional] What gif best describes this PR or how it makes you feel?

netlify[bot] commented 1 month ago

Deploy Preview for analog-ng-app ready!

Name Link
Latest commit 14de372db6327e3a4b3b59a46cfb868ce640171e
Latest deploy log https://app.netlify.com/sites/analog-ng-app/deploys/66ec1fbb9aab6900081142cf
Deploy Preview https://deploy-preview-1357--analog-ng-app.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 1 month ago

Deploy Preview for analog-docs ready!

Name Link
Latest commit 14de372db6327e3a4b3b59a46cfb868ce640171e
Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/66ec1fbb450b730008a52f75
Deploy Preview https://deploy-preview-1357--analog-docs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 1 month ago

Deploy Preview for analog-app ready!

Name Link
Latest commit 14de372db6327e3a4b3b59a46cfb868ce640171e
Latest deploy log https://app.netlify.com/sites/analog-app/deploys/66ec1fbb37d19a0008ea31d7
Deploy Preview https://deploy-preview-1357--analog-app.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] commented 1 month ago

Deploy Preview for analog-blog ready!

Name Link
Latest commit 14de372db6327e3a4b3b59a46cfb868ce640171e
Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/66ec1fbb4982170008200fa3
Deploy Preview https://deploy-preview-1357--analog-blog.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.