-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(assets): Use Vite's isFileLoadingAllowed to check if a file can be loaded #15052
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
Conversation
🦋 Changeset detectedLatest commit: 90b6a77 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 |
CodSpeed Performance ReportMerging #15052 will not alter performanceComparing Summary
|
matthewp
left a comment
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.
nice tests!
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Emanuele Stoppa <[email protected]> Co-authored-by: Matt Kane <[email protected]> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Matthew Phillips <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]> Co-authored-by: Erika <[email protected]> Co-authored-by: Sarah Rainsberger <[email protected]> Co-authored-by: Armand Philippot <[email protected]> Co-authored-by: Antony Faris <[email protected]> Co-authored-by: Erika <[email protected]> Co-authored-by: Chris Swithinbank <[email protected]> Co-authored-by: Houston (Bot) <[email protected]> Co-authored-by: Florian Lefebvre <[email protected]> Co-authored-by: Volpeon <[email protected]> Co-authored-by: Martin Trapp <[email protected]> Co-authored-by: fkatsuhiro <[email protected]> Co-authored-by: Oliver Speir <[email protected]> Co-authored-by: Andreas Deininger <[email protected]> Co-authored-by: Roman <[email protected]> Co-authored-by: fabon <[email protected]> Co-authored-by: Raanelom <[email protected]> Co-authored-by: Rahul Dogra <[email protected]> fix(ci): Reinstall deps after having published VS Code (#14996) fix(svelte): allow client directives (#15004) fix(assets): Fixes missing format option for svgs in the passthrough service (#14987) fix(deps): update all non-major dependencies (#15020) fix(content-layer): Try a smarter solution to normalize bare image paths in JSON (#15028) fix(astro): assets vite build log (#15034) resolved (#15033) fix: Remote images: Prevent internal caching from interfering with Astro's cache (#14954) fix(deps): update astro adapters (#15084) fix(deps): update all non-major dependencies (#15072) fix(deps): update astro client runtimes (#15085) fix: move ts-plugin node_modules to dist (#15083) fix: components imports paths (#15107) fix(assets): Use Vite's isFileLoadingAllowed to check if a file can be loaded (#15052) fix(vscode): Correctly handle TypeScript blocks ending with types (#15109) fix(svelte): improve Svelte children prop type checking (#15070) fix Firefox e2e tests for playwright 1.57 (#15113) fix(deps): update astro dependencies (#15103) fix: lint vt test (#15114) fix(deps): update language tools (#15104) resolver abstraction (#15111) fix(vue): add HTML attributes to generated TypeScript types (#15016) Fixes #14686
Changes
So Vite actually exposes a method that allows you to check if a file is authorized or not in its dev server, this is pretty neat however it requires a resolved config because it uses some of the properties. Since the image endpoint runs in the user's code, we can only expose this through a Vite plugin, but it's not the first time we do that, so it's ok.
Testing
Added a few tests
Docs
N/A