Skip to content

Commit 5b4f982

Browse files
authored
Merge pull request embroider-build#2143 from embroider-build/vite-hbs-cleanup
Vite hbs plugin should return resolutions
2 parents e757dc6 + d497306 commit 5b4f982

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/vite/src/hbs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ export function hbs(): Plugin {
3333
});
3434

3535
if (!resolution) {
36+
// vite already has extension search fallback for extensionless imports.
37+
// This is different, it covers an explicit .js import fallback to the
38+
// corresponding hbs.
3639
let hbsSource = syntheticJStoHBS(source);
3740
if (hbsSource) {
3841
resolution = await this.resolve(hbsSource, importer, {
@@ -70,6 +73,8 @@ export function hbs(): Plugin {
7073
},
7174
};
7275
}
76+
77+
return resolution;
7378
},
7479

7580
load(id: string) {

0 commit comments

Comments
 (0)