Skip to content

feat: add support for new compiler assets api#277

Merged
DylanPiercey merged 1 commit into
mainfrom
link-assets-compiler
Jun 13, 2026
Merged

feat: add support for new compiler assets api#277
DylanPiercey merged 1 commit into
mainfrom
link-assets-compiler

Conversation

@DylanPiercey

Copy link
Copy Markdown
Contributor

Add support for the Marko compiler's built-in asset orchestration. When the installed compiler and translator support it, the plugin lets the compiler generate server entry wrappers and flush assets, including assets for lazily loaded (import ... with { load }) templates.

The getMarkoAssetCodeForEntry plugin api is now deprecated. It targets the legacy asset handling, so any plugin providing it opts the build out of the compiler's built-in asset orchestration.

@DylanPiercey DylanPiercey self-assigned this Jun 13, 2026
@changeset-bot

changeset-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 10e6bf8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@marko/vite Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-project-automation github-project-automation Bot moved this to Todo in Roadmap Jun 13, 2026
@DylanPiercey DylanPiercey merged commit 94f5609 into main Jun 13, 2026
7 checks passed
@DylanPiercey DylanPiercey deleted the link-assets-compiler branch June 13, 2026 00:52
@github-project-automation github-project-automation Bot moved this from Todo to Done in Roadmap Jun 13, 2026
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This PR adds support for Marko compiler's built-in linkAssets asset orchestration to the Vite plugin. The change introduces a new runtime module for asset registration and linked manifest generation alongside the legacy orchestration path. The plugin now detects compiler/translator capability, conditionally configures linked mode, transforms server entries to register assets, and generates HTML manifests separating blocking from deferred assets. Load entries (lazily loaded templates) are tracked and their CSS dependencies collected during bundling to prevent flash of unstyled content. Supporting changes include updated dev/build integration, a more complete browser test harness for SSR scenarios, and two comprehensive test fixtures exercising the new functionality.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main objective of the PR—adding support for the new Marko compiler assets API for built-in asset orchestration.
Description check ✅ Passed The description clearly explains the feature being added and its relationship to the changeset, including the deprecation of the legacy API.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch link-assets-compiler

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed due to a network error.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot mentioned this pull request Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant