Skip to content

fix(presets): copy previous build output to .edge/assets with --skip-framework-build - #501

Merged
jose-filho-azion merged 3 commits into
mainfrom
fix/presets-skip-framework-build
Nov 17, 2026
Merged

jose-filho-azion merged 3 commits into
mainfrom
fix/presets-skip-framework-build

Conversation

@jose-filho-azion

@jose-filho-azion jose-filho-azion commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Description

With --skip-framework-build, the vue, react, preact, qwik, vitepress, vuepress and angular
presets only created the storage folder (.edge/assets, or dist for angular) and returned. Even when
the framework build already existed (dist, build, docs/.vitepress/dist, ...), the storage folder stayed
empty, or for angular had the build nested in a subfolder, and the deployed package shipped without
usable assets. vuepress was worse: skip mode deleted the existing .vuepress/dist.

In skip mode, each preset now reuses the output of the previous build:

  • vue: copies outDir from vite.config, or dist (also covers Vue CLI), to .edge/assets.
  • react: copies outDir from vite.config, or dist for Vite projects; build for CRA projects.
  • preact: copies outDir from vite.config, or dist.
  • qwik: copies outDir from adapters/static/vite.config.ts, or dist.
  • vitepress / vuepress: copy docs/.<framework>/dist or .<framework>/dist.
  • angular: a plain ng build writes to dist/<project> or dist/<project>/browser, but the storage dir
    expects the files directly in dist. The preset now moves that output to the dist root, like the
    regular build flow does. A build already at the dist root is left untouched.

If there is no previous build, the previous behavior is kept (empty storage folder). In preact, the rm
of outDir in the regular build flow is unchanged.

Presets whose storage dir points straight at the folder the framework generates (jekyll, hugo, gatsby,
stencil, docusaurus, svelte, astro) are not affected.

Type of change

  • feat: new feature
  • fix: bug fix
  • docs: / refactor: / test: / ci: / chore:
  • Breaking change

Bump

  • #major — breaking change
  • #minor — new backward-compatible feature
  • #patch — fix, refactor, docs
  • #none — no release (CI, internal docs)

Testing

  • Tests added or updated for the changed behavior
  • CI is green

Added unit tests for the prebuild of the seven presets running with skipFrameworkBuild, against a
temporary project directory (src/presets/<preset>/prebuild.test.ts). They fail against the previous
implementation. Also checked with tsc --noEmit, eslint and prettier. The presets are also covered
by the e2e tests in the bundler, and were tested manually by running the bundler with
--skip-framework-build on projects that already had a framework build.

Checklist

  • PR title follows Conventional Commits (type: description, optional [TICKET] prefix)
  • CHANGELOG.md updated, if the repository keeps one
  • No secrets, credentials or internal hostnames in code, logs or this description

A changeset was added in .changeset/fix-presets-skip-framework-build.md
(CHANGELOG.md is generated by changesets on release).

…framework-build

The vue, react, preact, qwik, vitepress and vuepress presets only created an empty
.edge/assets when skipping the framework build, so an existing build output was
never picked up. vuepress also deleted its previous output.
They now copy the existing output folder to .edge/assets.
@github-actions

Copy link
Copy Markdown
Contributor

SCC Complexity Analysis

  • Title: fix(presets): copy previous build output to .edge/assets with --skip-framework-build
  • Author: jose-filho-azion
Metric Source Branch (fix/presets-skip-framework-build) Target Branch (main) Difference
Complexity 4515 4512 3
Code 76350 76258 92

@pkg-pr-new

pkg-pr-new Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@aziontech/builder@501
npm i https://pkg.pr.new/@aziontech/presets@501

commit: ee718bb

Add unit tests for the vue, react, preact, qwik, vitepress and vuepress prebuild
functions running with skipFrameworkBuild, against a temporary project directory.
@github-actions

Copy link
Copy Markdown
Contributor

SCC Complexity Analysis

  • Title: fix(presets): copy previous build output to .edge/assets with --skip-framework-build
  • Author: jose-filho-azion
Metric Source Branch (fix/presets-skip-framework-build) Target Branch (main) Difference
Complexity 4516 4512 4
Code 76583 76258 325

@jose-filho-azion
jose-filho-azion marked this pull request as ready for review November 17, 2026 14:06
@jose-filho-azion
jose-filho-azion requested a review from a team as a code owner November 17, 2026 14:06
…work-build

The angular preset only created dist when skipping the framework build, so the output
of a plain ng build (dist/<project> or dist/<project>/browser) stayed in a subfolder.
It now moves it to the dist root, like the regular build flow does.
@github-actions

Copy link
Copy Markdown
Contributor

SCC Complexity Analysis

  • Title: fix(presets): copy previous build output to .edge/assets with --skip-framework-build
  • Author: jose-filho-azion
Metric Source Branch (fix/presets-skip-framework-build) Target Branch (main) Difference
Complexity 4521 4512 9
Code 76652 76258 394

@jose-filho-azion
jose-filho-azion merged commit 4fe1f01 into main Nov 17, 2026
11 checks passed
@jose-filho-azion
jose-filho-azion deleted the fix/presets-skip-framework-build branch November 17, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants