Skip to content

Commit

Permalink
fix(declarations): fixes an issue with detecting the entry file name …
Browse files Browse the repository at this point in the history
…for a chunk
  • Loading branch information
wessberg committed Feb 6, 2019
1 parent a04ae60 commit 7786000
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/plugin/typescript-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ export default function typescriptRollupPlugin(pluginInputOptions: Partial<Types
chunks.forEach((chunk: OutputChunk) => {
const localModuleNames = Object.keys(chunk.modules).filter(canEmitForFile);
const entryFileName = localModuleNames.slice(-1)[0];
// Don't emit declarations when there is no compatible entry file
if (entryFileName == null) return;

emitDeclarations({
chunk,
Expand Down

0 comments on commit 7786000

Please sign in to comment.