rollup-dependency-tree
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -34,3 +34,3 @@ "use strict"; | ||
var importedChunk = allChunks.find(function (chunk) { return chunk.fileName === fileName; }); | ||
if (!result.has(importedChunk)) { // avoid cycles | ||
if (importedChunk && !result.has(importedChunk)) { // avoid cycles | ||
result.add(importedChunk); | ||
@@ -43,3 +43,3 @@ dependenciesForTree(importedChunk, allChunks, opts).forEach(function (c) { return result.add(c); }); | ||
var c = allChunks.find(function (chunk) { return chunk.fileName === fileName; }); | ||
if (opts.dynamicImports(c)) { | ||
if (c && opts.dynamicImports(c)) { | ||
result.add(c); | ||
@@ -46,0 +46,0 @@ } |
@@ -45,3 +45,3 @@ import type { RenderedChunk } from 'rollup'; | ||
let importedChunk = allChunks.find(chunk => chunk.fileName === fileName); | ||
if (!result.has(importedChunk)) { // avoid cycles | ||
if (importedChunk && !result.has(importedChunk)) { // avoid cycles | ||
result.add(importedChunk); | ||
@@ -54,3 +54,3 @@ dependenciesForTree(importedChunk, allChunks, opts).forEach(c => result.add(c)); | ||
const c = allChunks.find(chunk => chunk.fileName === fileName); | ||
if (opts.dynamicImports(c)) { | ||
if (c && opts.dynamicImports(c)) { | ||
result.add(c); | ||
@@ -57,0 +57,0 @@ } |
{ | ||
"name": "rollup-dependency-tree", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Builds a dependency tree from a Rollup compilation result", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
718503