---
title: "@astrojs/compiler 4.0.0 Breaking Changes on npm | Since.dev"
description: "What each @astrojs/compiler release removed, renamed or changed: 8 breaking changes in 4 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@astrojs/compiler
last_updated: 2026-12-04
---

# @astrojs/compiler breaking changes

@astrojs/compiler 4.0.0 (April 27, 2026) is its newest release with breaking changes, 3 of them. The first: Behavior changed templateEnter. Every breaking API change we have recorded in @astrojs/compiler on npm: 8 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.0.0`, released April 27, 2026. [Source repository](https://github.com/withastro/compiler)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [3.0.0](#v-3-0-0) to [4.0.0](#v-4-0-0): 3 breaking changes in 1 version.
- From [2.0.0](#v-2-0-0) to [4.0.0](#v-4-0-0): 7 breaking changes in 3 versions.

## @astrojs/compiler 4.0.0 breaking changes

@astrojs/compiler 4.0.0, released April 27, 2026: 3 breaking changes.

- **Behavior changed** `templateEnter`  

Major release: templateEnter is called when emitting a template element. Code that depended on the earlier calls should be checked and updated. [github.com](https://github.com/withastro/compiler/releases/tag/%40astrojs/compiler%404.0.0)
- **Behavior changed** `templateExit`  

Major release: templateExit is called when emitting a template element. Code that depended on the earlier calls should be checked and updated. [github.com](https://github.com/withastro/compiler/releases/tag/%40astrojs/compiler%404.0.0)
- **Signature changed** `TransformOptions.compact`  

Was compact?: boolean; now compact?: boolean | 'jsx'. [npmjs.com](https://www.npmjs.com/package/@astrojs/compiler/v/4.0.0)

## @astrojs/compiler 3.0.0 breaking changes

@astrojs/compiler 3.0.0, released March 6, 2026: 3 breaking changes.

- **Removed** `$$result.createAstro`  

createAstro no longer accepts an AstroGlobalPartial as its first argument; drop that argument and call $$result.createAstro($$props, $$slots). [github.com](https://github.com/withastro/compiler/releases/tag/%40astrojs/compiler%403.0.0)
- **Removed** `TransformOptions.experimentalScriptOrder`  

experimentalScriptOrder is gone from TransformOptions; its behavior is now always on, so stop passing it. [npmjs.com](https://www.npmjs.com/package/@astrojs/compiler/v/3.0.0)
- **Removed** `TransformOptions.renderScript`  

renderScript is gone from TransformOptions; its behavior is now always on, so stop passing it. [npmjs.com](https://www.npmjs.com/package/@astrojs/compiler/v/3.0.0)

## @astrojs/compiler 3.0.0-beta.0 breaking changes

@astrojs/compiler 3.0.0-beta.0, released March 6, 2026: 1 breaking change.

- **Removed** `$$result.createAstro`  

createAstro no longer accepts an AstroGlobalPartial as its first argument; drop that argument and call $$result.createAstro($$props, $$slots). [github.com](https://github.com/withastro/compiler/releases/tag/%40astrojs/compiler%403.0.0-beta.0)

## @astrojs/compiler 2.0.0 breaking changes

@astrojs/compiler 2.0.0, released August 21, 2023: 1 breaking change.

- **Behavior changed**  

The compiler's scope hash is now lowercase to match HTML attribute name rules, since it is used in data attribute names. Code that relied on the previous mixed-case hash value must be updated. [github.com](https://github.com/withastro/compiler/releases/tag/%40astrojs/compiler%402.0.0)

## Related packages

- [@astrojs/cloudflare](https://since.dev/packages/npm/@astrojs/cloudflare.md)
- [@astrojs/markdown-remark](https://since.dev/packages/npm/@astrojs/markdown-remark.md)
- [@astrojs/markdown-satteri](https://since.dev/packages/npm/@astrojs/markdown-satteri.md)
- [@astrojs/mdx](https://since.dev/packages/npm/@astrojs/mdx.md)
- [@astrojs/node](https://since.dev/packages/npm/@astrojs/node.md)
- [@astrojs/react](https://since.dev/packages/npm/@astrojs/react.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
