-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix asynchronous
appEntrypoint
support (#9558)
- Loading branch information
1 parent
22f42d1
commit e496b2e
Showing
11 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astrojs/vue": patch | ||
--- | ||
|
||
Fixes support for async `appEntrypoint` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/integrations/vue/test/fixtures/app-entrypoint-async/astro.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import vue from '@astrojs/vue'; | ||
import ViteSvgLoader from 'vite-svg-loader' | ||
|
||
export default defineConfig({ | ||
integrations: [vue({ | ||
appEntrypoint: '/src/pages/_app' | ||
})], | ||
vite: { | ||
plugins: [ | ||
ViteSvgLoader(), | ||
], | ||
}, | ||
}) |
10 changes: 10 additions & 0 deletions
10
packages/integrations/vue/test/fixtures/app-entrypoint-async/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"name": "@test/vue-app-entrypoint-async", | ||
"version": "0.0.0", | ||
"private": true, | ||
"dependencies": { | ||
"@astrojs/vue": "workspace:*", | ||
"astro": "workspace:*", | ||
"vite-svg-loader": "5.0.1" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/integrations/vue/test/fixtures/app-entrypoint-async/src/components/Bar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div id="bar">works</div> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
packages/integrations/vue/test/fixtures/app-entrypoint-async/src/components/Baz.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div id="baz">works</div> | ||
</template> |
6 changes: 6 additions & 0 deletions
6
packages/integrations/vue/test/fixtures/app-entrypoint-async/src/components/Foo.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<template> | ||
<div id="foo"> | ||
<Bar /> | ||
<Baz /> | ||
</div> | ||
</template> |
11 changes: 11 additions & 0 deletions
11
packages/integrations/vue/test/fixtures/app-entrypoint-async/src/pages/_app.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import type { App } from 'vue' | ||
import Bar from '../components/Bar.vue' | ||
import Baz from '../components/Baz.vue' | ||
|
||
export default async function setup(app: App) { | ||
app.component('Bar', Bar); | ||
|
||
await new Promise(resolve => setTimeout(resolve, 250)); | ||
|
||
app.component('Baz', Baz); | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/integrations/vue/test/fixtures/app-entrypoint-async/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
import Foo from '../components/Foo.vue'; | ||
--- | ||
|
||
<html> | ||
<head> | ||
<title>Vue App Entrypoint</title> | ||
</head> | ||
<body> | ||
<Foo client:load /> | ||
</body> | ||
</html> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.