analog icon indicating copy to clipboard operation
analog copied to clipboard

vite-plugin-nitro/../renderer.mjs is imported as absolute file:/// path inside nitro.mjs when doing a production build

Open svrijsewijk opened this issue 1 year ago • 1 comments

Please provide the environment you discovered this bug in.

A local production build.

Which area/package is the issue in?

vite-plugin-nitro

Description

When doing a local production build the resulting artifacts contain an absolute import:

..dist\apps\web\analog\server\chunks\_\nitro.mjs

const _lazy_RvlxZx = () => import('file:///D:/temp/.umbraco/frontend/node_modules/@analogjs/vite-plugin-nitro/src/lib/runtime/renderer.mjs');

vite.config.ts analog config:

      analog({
        ssr: true,
        nitro: {
          preset: 'node_server',
        },
        prerender: {
          routes: async () => {
            return [];
          },
        },
      }),

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • [ ] Yes
  • [ ] No

svrijsewijk avatar Nov 18 '25 16:11 svrijsewijk

This is likely a local issue with your folder setup. Provide a reproduction and we'll take a look

brandonroberts avatar Nov 19 '25 04:11 brandonroberts