Repository navigation
fix(presets): copy previous build output to .edge/assets with --skip-framework-build - #501
Merged
Merged
Conversation
…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.
Contributor
SCC Complexity Analysis
|
commit: |
Add unit tests for the vue, react, preact, qwik, vitepress and vuepress prebuild functions running with skipFrameworkBuild, against a temporary project directory.
Contributor
SCC Complexity Analysis
|
jose-filho-azion
marked this pull request as ready for review
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.
Contributor
SCC Complexity Analysis
|
patrick-menoti-azion
approved these changes
Nov 17, 2026
pablo-diehl-azion
approved these changes
Nov 17, 2026
magnun-furtado-azion
approved these changes
Nov 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
With
--skip-framework-build, thevue,react,preact,qwik,vitepress,vuepressandangularpresets only created the storage folder (
.edge/assets, ordistforangular) and returned. Even whenthe framework build already existed (
dist,build,docs/.vitepress/dist, ...), the storage folder stayedempty, or for
angularhad the build nested in a subfolder, and the deployed package shipped withoutusable assets.
vuepresswas worse: skip mode deleted the existing.vuepress/dist.In skip mode, each preset now reuses the output of the previous build:
vue: copiesoutDirfromvite.config, ordist(also covers Vue CLI), to.edge/assets.react: copiesoutDirfromvite.config, ordistfor Vite projects;buildfor CRA projects.preact: copiesoutDirfromvite.config, ordist.qwik: copiesoutDirfromadapters/static/vite.config.ts, ordist.vitepress/vuepress: copydocs/.<framework>/distor.<framework>/dist.angular: a plainng buildwrites todist/<project>ordist/<project>/browser, but the storage direxpects the files directly in
dist. The preset now moves that output to thedistroot, like theregular build flow does. A build already at the
distroot is left untouched.If there is no previous build, the previous behavior is kept (empty storage folder). In
preact, thermof
outDirin 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 featurefix:bug fixdocs:/refactor:/test:/ci:/chore:Bump
#major— breaking change#minor— new backward-compatible feature#patch— fix, refactor, docs#none— no release (CI, internal docs)Testing
Added unit tests for the
prebuildof the seven presets running withskipFrameworkBuild, against atemporary project directory (
src/presets/<preset>/prebuild.test.ts). They fail against the previousimplementation. Also checked with
tsc --noEmit,eslintandprettier. The presets are also coveredby the e2e tests in the bundler, and were tested manually by running the bundler with
--skip-framework-buildon projects that already had a framework build.Checklist
type: description, optional[TICKET]prefix)CHANGELOG.mdupdated, if the repository keeps oneA changeset was added in
.changeset/fix-presets-skip-framework-build.md(
CHANGELOG.mdis generated by changesets on release).