Skip to content

Commit 23c9ae3

Browse files
committed
fix: no warning for empty shim deps
1 parent 03e8c31 commit 23c9ae3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/transformers/defines.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ export default function(moduleId, amdContents, shim) {
3535
if (!shim) return result;
3636
// bypass shim settings as package already defined amd module
3737
if (result.defined) {
38-
warn('for module "' + moduleId + '", it defined amd module "' +
38+
if (shim.deps && shim.deps.length) {
39+
warn('for module "' + moduleId + '", it defined amd module "' +
3940
result.defined + '", ignores shim settings ' +
4041
JSON.stringify(shim));
42+
}
4143
return result;
4244
}
4345

0 commit comments

Comments
 (0)