8000 fix: don't throw asset reference error on wildcard imports · fuse-box/fuse-box@d594e65 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit d594e65

Browse files
Oleksandr Serhiienkonchanged
authored andcommitted
fix: don't throw asset reference error on wildcard imports
1 parent 9c7c61e commit d594e65

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/core/File.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -446,12 +446,13 @@ export class File {
446446
this.context.extensionOverrides && this.context.extensionOverrides.setOverrideFileInfo(this);
447447

448448
if (!fs.existsSync(this.info.absPath)) {
449-
450-
if (/\.jsx?$/.test(this.info.fuseBoxPath) && this.context.fuse && this.context.fuse.producer) {
451-
this.context.fuse.producer.addWarning('unresolved',
452-
`Statement "${this.info.fuseBoxPath}" has failed to resolve in module "${this.collection && this.collection.name}"`);
453-
} else {
454-
this.addError(`Asset reference "${this.info.fuseBoxPath}" has failed to resolve in module "${this.collection && this.collection.name}"`);
449+
if (!/\*/.test(this.info.fuseBoxPath)) {
450+
if (/\.js(x)?$/.test(this.info.fuseBoxPath) && this.context.fuse && this.context.fuse.producer) {
451+
this.context.fuse.producer.addWarning('unresolved',
452+
`Statement "${this.info.fuseBoxPath}" has failed to resolve in module "${this.collection && this.collection.name}"`);
453+
} else {
454+
this.addError(`Asset reference "${this.info.fuseBoxPath}" has failed to resolve in module "${this.collection && this.collection.name}"`);
455+
}
455456
}
456457
this.notFound = true;
457458
return;

0 commit comments

Comments
 (0)
0