Skip to content

Commit

Permalink
fix: Allow artifact imports to reference each other.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 13, 2020
1 parent f970c94 commit cb76c13
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/configs/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ export function getRollupConfig(
}

const packagePath = path.resolve(artifact.package.getJsonPath().path());
const external = [packagePath];

// Allow other artifacts to reference the primary index
if (artifact.outputName !== 'index') {
external.push('./index');
}
// Allow artifacts to reference other artifact imports
const external = artifact.package.artifacts
.filter((a) => 'outputName' in a)
.map((a) => `./${(a as BundleArtifact).outputName}`);

const config: RollupOptions = {
cache: artifact.cache,
Expand Down

0 comments on commit cb76c13

Please sign in to comment.