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
Fix unable to load .json
files outside of public directory
#810
Conversation
🦋 Changeset detectedLatest commit: 0271667 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Size Change: -2 B (0%) Total Size: 796 kB
ℹ️ View Unchanged
|
|
||
const resolved = await this.resolve(id, importer, { skipSelf: true }); | ||
return resolved && INTERNAL_PREFIX + resolved.id; | ||
return resolved && resolved.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A thought: what if we returned ${resolved.id}?json
here? (or ${resolved.id}?module
?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We currently add ?module
to any script file that's imported from a script. I feel like that's a more reliable approach as this allows us to differentiate urls that were fetched directly via fetch()
calls vs urls that were loaded by an import statement.
EDIT: Fixed 👍 |
b03b48c
to
0271667
Compare
No description provided.