astro 3.0.0-beta.1
Major Changes
-
#7952
3c3100851Thanks @astrobot-houston! - Remove support forAstro.__renderMarkdownwhich is used by@astrojs/markdown-component.The
<Markdown />component was deprecated in Astro v1 and is completely removed in v3. This integration must now be removed from your project.As an alternative, you can use community packages that provide a similar component like https://github.com/natemoo-re/astro-remote instead.
-
#8019
34cb20021Thanks @bluwy! - Remove backwards-compatible kebab-case transform for camelCase CSS variable names passed to thestyleattribute. If you were relying on the kebab-case transform in your styles, make sure to use the camelCase version to prevent missing styles. For example:--- const myValue = 'red'; --- <!-- input --> <div style={{ '--myValue': myValue }}></div> <!-- output (before) --> <div style="--my-value:var(--myValue);--myValue:red"></div> <!-- output (after) --> <div style="--myValue:red"></div><style> div { - color: var(--my-value); + color: var(--myValue); } </style> -
#7893
7bd1b86f8Thanks @ematipico! - Implements a new scope style strategy called"attribute". When enabled, styles are applied usingdata-*attributes.The default value of
scopedStyleStrategyis"attribute".If you want to use the previous behaviour, you have to use the
"where"option:import { defineConfig } from 'astro/config'; export default defineConfig({ + scopedStyleStrategy: 'where', }); -
#7924
519a1c4e8Thanks @matthewp! - Astro's JSX handling has been refactored with better support for each framework.Previously, Astro automatically scanned your components to determine which framework-specific transformations should be used. In practice, supporting advanced features like Fast Refresh with this approach proved difficult.
Now, Astro determines which framework to use with
includeandexcludeconfig options where you can specify files and folders on a per-framework basis. When using multiple JSX frameworks in the same project, users should manually control which files belong to each framework using theincludeandexcludeoptions.export default defineConfig({ // The `include` config is only needed in projects that use multiple JSX frameworks; // if only using one no extra config is needed. integrations: [ preact({ include: ['**/preact/*'], }), react({ include: ['**/react/*'], }), solid({ include: ['**/solid/*'], }), ], }); -
#7878
0f637c71eThanks @bluwy! - The value ofimport.meta.env.BASE_URL, which is derived from thebaseoption, will no longer have a trailing slash added by default or whentrailingSlash: "ignore"is set. The existing behavior ofbasein combination withtrailingSlash: "always"ortrailingSlash: "never"is unchanged.If your
basealready has a trailing slash, no change is needed.If your
basedoes not have a trailing slash, add one to preserve the previous behaviour:// astro.config.mjs - base: 'my-base', + base: 'my-base/',
Minor Changes
- #8012
866ed4098Thanks @ematipico! - Add a newastro/errorsmodule. Developers can importAstroUserError, and provide amessageand an optionalhint
Patch Changes
-
#7998
65c354969Thanks @bluwy! - Callastro synconce before callingastro check -
#7952
70f34f5a3Thanks @astrobot-houston! - Remove StreamingCompatibleResponse polyfill -
#8011
5b1e39ef6Thanks @bluwy! - Move hoisted script analysis optimization behind theexperimental.optimizeHoistedScriptoption -
Updated dependencies [
b675acb2a]:- @astrojs/telemetry@3.0.0-beta.1