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: set fetch options #75

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: set fetch options #75

wants to merge 1 commit into from

Conversation

b3nten
Copy link

@b3nten b3nten commented Jun 28, 2023

Certain packages export different contents depending on the target platform for compilation. For example, there is a significant difference bundling @solid-js/web for the server versus the client, eg. https://esm.sh/stable/[email protected]/deno/web.js & https://esm.sh/stable/[email protected]/es2022/web.js.

By allowing users to set the user-agent header we can bundle for different targets besides deno. I'm think there could also be other usecases for this, such as bundling authenticated resources etc.

I've gone ahead and passed an RequestInit object from the plugin options to the portable loader. It doesn't seem like it's possible to change how the native loader fetches data though.

Copy link
Owner

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM

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