mirror of
https://github.com/withastro/astro.git
synced 2024-12-16 21:46:22 -05:00
Improve serverEntrypoint codegen (#12566)
* Remove fileurl handling * fix
This commit is contained in:
parent
62939add0b
commit
29bcdf5296
2 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ export function vitePluginRenderers(opts: StaticBuildOptions): VitePlugin {
|
|||
|
||||
for (const renderer of opts.settings.renderers) {
|
||||
const variable = `_renderer${i}`;
|
||||
imports.push(`import ${variable} from '${renderer.serverEntrypoint}';`);
|
||||
imports.push(`import ${variable} from ${JSON.stringify(renderer.serverEntrypoint)};`);
|
||||
rendererItems += `Object.assign(${JSON.stringify(renderer)}, { ssr: ${variable} }),`;
|
||||
i++;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ function vitePluginAdapter(adapter: AstroAdapter): VitePlugin {
|
|||
},
|
||||
async load(id) {
|
||||
if (id === RESOLVED_ADAPTER_VIRTUAL_MODULE_ID) {
|
||||
return `export * from '${adapter.serverEntrypoint}';`;
|
||||
return `export * from ${JSON.stringify(adapter.serverEntrypoint)};`;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue