Skip to content

Commit 156cf07

Browse files
committed
generate CJS and ES version of main package
1 parent dfb69c0 commit 156cf07

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

rollup.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,19 @@ export default [
7878
plugins: serverPlugins,
7979
},
8080

81+
// CJS and ES versions.
82+
// The subpackages are the preferred way of importing
83+
// stuff from the library instead of these.
84+
{
85+
input: 'packages/main.js',
86+
external,
87+
output: [
88+
{ file: pkg.main, format: 'cjs' },
89+
{ file: pkg.module, format: 'esm' },
90+
],
91+
plugins,
92+
},
93+
8194
// Browser minified version.
8295
{
8396
input: 'packages/main.js',

0 commit comments

Comments
 (0)