WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0a0f154

Browse files
committed
fixup
1 parent da2a6d9 commit 0a0f154

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tools/getRollupOptions.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ function getRollupOptions(/** @type {import('rollup').RollupOptions} */ options)
1010
// Add interop for CJS
1111
...(output.format === 'cjs' && { interop: 'compat' }),
1212
}));
13-
}
1413

15-
// Add plugin to preserve 'use client' directives in the output files
16-
options.plugins = options.plugins || [];
17-
options.plugins.push(preserveDirectives());
14+
// Add plugin to preserve 'use client' directives in the output files
15+
options.plugins = options.plugins || [];
16+
options.plugins.push(preserveDirectives());
17+
18+
return options;
19+
}
1820

19-
return options;
21+
throw new Error('"options.output" should be an array');
2022
}
2123

2224
module.exports = getRollupOptions;

0 commit comments

Comments
 (0)