We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c9d8ef commit 495df9dCopy full SHA for 495df9d
scripts/rollup/build.js
@@ -582,6 +582,17 @@ async function createBundle(bundle, bundleType) {
582
const containsThisModule = pkg => id === pkg || id.startsWith(pkg + '/');
583
const isProvidedByDependency = externals.some(containsThisModule);
584
if (!shouldBundleDependencies && isProvidedByDependency) {
585
+ if (id.indexOf('/src/') !== -1) {
586
+ throw Error(
587
+ 'You are trying to import ' +
588
+ id +
589
+ ' but ' +
590
+ externals.find(containsThisModule) +
591
+ ' is one of npm dependencies, ' +
592
+ 'so it will not contain that source file. You probably want ' +
593
+ 'to create a new bundle entry point for it instead.'
594
+ );
595
+ }
596
return true;
597
}
598
return !!peerGlobals[id];
0 commit comments