Skip to content

[orga-build] decouple vite root from content root#320

Merged
xiaoxinghu merged 5 commits intomainfrom
orga-build
Mar 1, 2026
Merged

[orga-build] decouple vite root from content root#320
xiaoxinghu merged 5 commits intomainfrom
orga-build

Conversation

@xiaoxinghu
Copy link
Collaborator

No description provided.

xiaoxinghu and others added 4 commits March 1, 2026 17:20
Adds an `exclude` array to orga-build config that accepts glob patterns,
giving users a way to prevent specific files from being treated as pages
or endpoints. Patterns are prefixed with `!` and appended to all three
globby calls (routes, layouts, components).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vite's root now defaults to process.cwd() instead of config.root.
This decouples the content scanning directory from Vite's project root,
allowing tools like the Cloudflare plugin to generate files at the
project root rather than inside the content directory.

Style URLs (e.g. '/style.css') are automatically prefixed with the
relative path to the content root so they resolve correctly under the
new Vite root without any changes to user config.

BREAKING CHANGE: Vite plugins that rely on config.root internally will
now see cwd instead of the content directory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Style values are now treated as file paths relative to the config file
(cwd), matching the convention of other config options like `root`.
A leading slash is tolerated as an alternative spelling — both
'docs/style.css' and '/docs/style.css' resolve to the same URL.

Normalization happens in loadConfig, removing the need for any
transformation at plugin setup time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@changeset-bot
Copy link

changeset-bot bot commented Mar 1, 2026

🦋 Changeset detected

Latest commit: de18ff6

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

This PR includes changesets to release 1 package
Name Type
orga-build 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

@xiaoxinghu xiaoxinghu merged commit 6a21ef5 into main Mar 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant