diff --git a/src/index.ts b/src/index.ts index cac4a26..7b5bc60 100644 --- a/src/index.ts +++ b/src/index.ts @@ -102,8 +102,12 @@ function generateJSReferences({ }: { files: string[]; publicPath: string; - attributes: Attributes; + attributes: Attributes | undefined; }): string { + if (!attributes) { + return ''; + } + return files .map( (file) =>