Fix docs smoke error (#5706)

Co-authored-by: bholmesdev <hey@bholmes.dev>
This commit is contained in:
Bjorn Lu 2023-01-02 21:31:51 +08:00 committed by GitHub
parent f4441e2726
commit c2844a79c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Add preact and sitemap integration to config load external list

View file

@ -218,3 +218,5 @@ jobs:
- name: Test - name: Test
run: pnpm run test:smoke run: pnpm run test:smoke
env:
NODE_OPTIONS: "--max-old-space-size=4096"

View file

@ -18,7 +18,7 @@
"format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json", "format:imports": "organize-imports-cli ./packages/*/tsconfig.json ./packages/*/*/tsconfig.json",
"test": "turbo run test --output-logs=new-only --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"", "test": "turbo run test --output-logs=new-only --concurrency=1 --filter=astro --filter=create-astro --filter=\"@astrojs/*\"",
"test:match": "cd packages/astro && pnpm run test:match", "test:match": "cd packages/astro && pnpm run test:match",
"test:smoke": "turbo run build --filter=\"@example/*\" --filter=\"astro.build\" --filter=\"docs\" --output-logs=new-only --concurrency=1", "test:smoke": "turbo run build --filter=\"@example/*\" --filter=\"docs\" --output-logs=new-only --concurrency=1",
"test:check-examples": "node ./scripts/smoke/check.js", "test:check-examples": "node ./scripts/smoke/check.js",
"test:vite-ci": "turbo run test --filter=astro --output-logs=new-only --no-deps --concurrency=1", "test:vite-ci": "turbo run test --filter=astro --output-logs=new-only --no-deps --concurrency=1",
"test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e", "test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e",

View file

@ -26,7 +26,13 @@ async function createViteLoader(root: string, fs: typeof fsType): Promise<ViteLo
// NOTE: Vite doesn't externalize linked packages by default. During testing locally, // NOTE: Vite doesn't externalize linked packages by default. During testing locally,
// these dependencies trip up Vite's dev SSR transform. In the future, we should // these dependencies trip up Vite's dev SSR transform. In the future, we should
// avoid `vite.createServer` and use `loadConfigFromFile` instead. // avoid `vite.createServer` and use `loadConfigFromFile` instead.
external: ['@astrojs/tailwind', '@astrojs/mdx', '@astrojs/react'], external: [
'@astrojs/tailwind',
'@astrojs/mdx',
'@astrojs/react',
'@astrojs/preact',
'@astrojs/sitemap',
],
}, },
plugins: [loadFallbackPlugin({ fs, root: pathToFileURL(root) })], plugins: [loadFallbackPlugin({ fs, root: pathToFileURL(root) })],
}); });