Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow $app/paths to be used without an app #8838

Merged
merged 12 commits into from
Feb 2, 2023
Merged

Conversation

benmccann
Copy link
Member

@benmccann benmccann commented Feb 1, 2023

This implements $app/paths as a virtual module which contains an initial value that can be overridden by the preview and dev servers. That allows components using $app/paths to work without setting up an entire application which makes things like component testing with Vitest, using Storybook, etc. easier.

I had to move get_option because it was used by analyse.js and thus importing the whole runtime into the Vite config file

@changeset-bot
Copy link

changeset-bot bot commented Feb 1, 2023

🦋 Changeset detected

Latest commit: 41052c4

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit 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

@Rich-Harris
Copy link
Member

The test failures look legit

@Rich-Harris
Copy link
Member

(which is unsurprising, since the set_paths(...) calls were removed from dev and preview)

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.

2 participants