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

Add warning when using assets with non-node adapters #6533

Merged
merged 2 commits into from
Mar 13, 2023

Conversation

Princesseuh
Copy link
Member

Changes

What the title says!

Closes #6529

Testing

N/A, just a warning

Docs

/cc @withastro/maintainers-docs for feedback!

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2023

🦋 Changeset detected

Latest commit: cda2102

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

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-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Mar 13, 2023
@@ -28,6 +29,30 @@ export default function assets({

globalThis.astroAsset = {};

const UNSUPPORTED_ADAPTERS = new Set([
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's okay for the error to be here, as this Vite plugin is only loaded when experimental.assets is enabled.

It's currently unclear if we'll add non-Node support before 3.0 (mostly depends on deps), but if we don't, we'll have to move this warning somewhere else where we have access to the Astro config, maybe in the astro:assets virtual module

@matthewp matthewp merged commit cc90d72 into main Mar 13, 2023
@matthewp matthewp deleted the fix/assets-non-node-warning branch March 13, 2023 17:16
@astrobot-houston astrobot-houston mentioned this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cloudflare Adapter unable to resolve node:fs
2 participants