Skip to content

Commit

Permalink
fix(vue): prefer resolvedVirtualModuleId
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re committed Oct 13, 2022
1 parent 90e574a commit b47e657
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/integrations/vue/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ function getJsxRenderer(): AstroRenderer {

function virtualAppEntrypoint(options?: Options) {
const virtualModuleId = 'virtual:@astrojs/vue/app';
// const resolvedVirtualModuleId = '\0' + virtualModuleId;
const resolvedVirtualModuleId = '\0' + virtualModuleId;
return {
name: '@astrojs/vue/virtual-app',
resolveId(id: string) {
if (id.endsWith(virtualModuleId)) {
return virtualModuleId;
if (id == virtualModuleId) {
return resolvedVirtualModuleId;
}
},
load(id: string) {
if (id === virtualModuleId) {
if (id === resolvedVirtualModuleId) {
if (options?.appEntrypoint) {
return `export { default as setup } from "${options.appEntrypoint}";`;
}
Expand Down

0 comments on commit b47e657

Please sign in to comment.