I'm trying to deploy a new Astro site (well, really an existing site rewritten from Next to Astro) on Netlify. I'm using output: "hybrid" to use SSR for a few "api" endpoints. The endpoints work locally using astro dev, but deploying to Netlify produces errors like this when Netlify bundles the functions produced by Astro:
3:37:32 PM: ▲ [WARNING] Ignoring this import because node_modules/path-to-regexp/dist/index.js was marked as having no side effects
3:37:32 PM: .netlify/functions-internal/chunks/favicon@[email protected]:7:7:
3:37:32 PM: 7 │ import 'path-to-regexp';
The deploy then fails with Build script returned non-zero exit code: 2 (even though the actual build step worked just fine).