From f66fd1f7370b3c4a314eb11e98edc75a6c897168 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Tue, 8 Jun 2021 09:17:05 -0400 Subject: [PATCH] Remove __astro_component from knownEntrypoints (#327) * Remove __astro_component from knownEntrypoints * Adds a default site. Otherwise the build throws * Adds the changeset --- .changeset/empty-geese-yawn.md | 5 +++++ packages/astro/snowpack-plugin.cjs | 2 +- packages/create-astro/src/templates/blog/astro.config.mjs | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/empty-geese-yawn.md diff --git a/.changeset/empty-geese-yawn.md b/.changeset/empty-geese-yawn.md new file mode 100644 index 000000000..16506d755 --- /dev/null +++ b/.changeset/empty-geese-yawn.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes regression caused by attempting to prebuild an internal dep diff --git a/packages/astro/snowpack-plugin.cjs b/packages/astro/snowpack-plugin.cjs index 141f227d7..124c94edc 100644 --- a/packages/astro/snowpack-plugin.cjs +++ b/packages/astro/snowpack-plugin.cjs @@ -6,7 +6,7 @@ const transformPromise = import('./dist/compiler/index.js'); module.exports = (snowpackConfig, { resolvePackageUrl, hmrPort, renderers, astroConfig } = {}) => { return { name: 'snowpack-astro', - knownEntrypoints: ['astro/dist/internal/h.js', 'astro/components/Prism.astro', 'astro/dist/internal/__astro_component.js'], + knownEntrypoints: ['astro/dist/internal/h.js', 'astro/components/Prism.astro'], resolve: { input: ['.astro', '.md'], output: ['.js', '.css'], diff --git a/packages/create-astro/src/templates/blog/astro.config.mjs b/packages/create-astro/src/templates/blog/astro.config.mjs index c7583a774..d72db6491 100644 --- a/packages/create-astro/src/templates/blog/astro.config.mjs +++ b/packages/create-astro/src/templates/blog/astro.config.mjs @@ -4,7 +4,7 @@ export default { // dist: './dist', // When running `astro build`, path to final static output // public: './public', // A folder of static files Astro will copy to the root. Useful for favicons, images, and other files that don’t need processing. buildOptions: { - // site: '', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. + site: 'http://example.com', // Your public domain, e.g.: https://my-site.dev/. Used to generate sitemaps and canonical URLs. // sitemap: true, // Generate sitemap (set to "false" to disable) }, devOptions: {