From 8a5b0c1f3a4be6bb62db66ec70144109ff5b4c59 Mon Sep 17 00:00:00 2001 From: Arsh <69170106+lilnasy@users.noreply.github.com> Date: Fri, 18 Aug 2023 12:22:06 +0530 Subject: [PATCH] Switch `build.inlineStylesheets` default to auto (#8118) * switch inlineStylesheets default * use previous default for astro/test * use previous default for content-collections-render.test.js * integrations: node, deno, mdx, markdown * typedocs: switch inlineStylesheets default * Update example to show non-default * add changeset * reword changeset --------- Co-authored-by: Sarah Rainsberger --- .changeset/smart-numbers-shout.md | 19 +++++++++++++++++++ packages/astro/src/@types/astro.ts | 4 ++-- packages/astro/src/core/config/schema.ts | 2 +- .../test/alias-tsconfig-baseurl-only.test.js | 2 ++ packages/astro/test/alias-tsconfig.test.js | 2 ++ packages/astro/test/asset-url-base.test.js | 4 ++++ packages/astro/test/astro-client-only.test.js | 4 ++++ .../astro/test/astro-css-bundling.test.js | 5 +++++ packages/astro/test/astro-directives.test.js | 6 +++++- packages/astro/test/astro-head.test.js | 2 ++ packages/astro/test/build-assets.test.js | 6 ++++++ packages/astro/test/component-library.test.js | 2 ++ .../astro/test/config-vite-css-target.test.js | 6 +++++- packages/astro/test/config-vite.test.js | 6 +++++- .../test/content-collections-render.test.js | 4 ++++ .../astro/test/css-import-as-inline.test.js | 2 ++ packages/astro/test/css-no-code-split.test.js | 6 +++++- packages/astro/test/css-order-import.test.js | 4 ++++ packages/astro/test/css-order-layout.test.js | 2 ++ packages/astro/test/css-order.test.js | 2 ++ packages/astro/test/glob-pages-css.test.js | 2 ++ packages/astro/test/head-injection.test.js | 2 ++ packages/astro/test/lazy-layout.test.js | 6 +++++- packages/astro/test/minification-html.test.js | 8 +++++++- packages/astro/test/page-level-styles.test.js | 2 ++ packages/astro/test/postcss.test.js | 2 ++ packages/astro/test/remote-css.test.js | 2 ++ packages/astro/test/root-srcdir-css.test.js | 2 ++ .../astro/test/scoped-style-strategy.test.js | 6 ++++++ packages/astro/test/ssr-404-500-pages.test.js | 2 ++ packages/astro/test/ssr-assets.test.js | 2 ++ packages/astro/test/ssr-dynamic.test.js | 2 ++ packages/astro/test/ssr-manifest.test.js | 2 ++ .../astro/test/ssr-split-manifest.test.js | 2 ++ packages/astro/test/static-build.test.js | 2 ++ .../astro/test/virtual-astro-file.test.js | 6 +++++- .../integrations/deno/test/basics.test.ts | 11 ++++------- .../markdoc/test/propagated-assets.test.js | 2 ++ .../mdx/test/css-head-mdx.test.js | 2 ++ .../integrations/mdx/test/mdx-page.test.js | 2 ++ .../node/test/prerender-404-500.test.js | 2 +- 41 files changed, 141 insertions(+), 18 deletions(-) create mode 100644 .changeset/smart-numbers-shout.md diff --git a/.changeset/smart-numbers-shout.md b/.changeset/smart-numbers-shout.md new file mode 100644 index 000000000000..4d5083862a43 --- /dev/null +++ b/.changeset/smart-numbers-shout.md @@ -0,0 +1,19 @@ +--- +'astro': patch +--- + +Astro is smarter about CSS! Small stylesheets are now inlined by default, and no longer incur the cost of additional requests to your server. Your visitors will have to wait less before they see your pages, especially those in remote locations or in a subway. + +This may not be news to you if you had opted-in via the `build.inlineStylesheets` configuration. Stabilized in Astro 2.6 and set to "auto" by default for Starlight, this configuration allows you to reduce the number of requests for stylesheets by inlining them into