Skip to content

Commit

Permalink
ensure its a embroider or file namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx committed Dec 4, 2024
1 parent 35f48d4 commit 89f6b7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/esbuild-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ export class EsBuildRequestAdapter implements RequestAdapter<Resolution<OnResolv
// and non-strict handlebars (which resolves
// components/helpers/modifiers against the app's global pool).
let pkg = this.packageCache.ownerOfFile(result.path);
if (pkg?.root === this.packageCache.appRoot) {
if (
pkg?.root === this.packageCache.appRoot &&
(result.namespace === 'file' || result.namespace.startsWith('embroider-'))
) {
let externalizedName = request.specifier;
if (!packageName(externalizedName)) {
// the request was a relative path. This won't remain valid once
Expand Down

0 comments on commit 89f6b7e

Please sign in to comment.