add cjs-dist format

This commit is contained in:
Chen Lily 2024-06-07 16:32:50 +08:00
parent f5b6ce360e
commit d296dd01fd
Signed by: tsanie
GPG Key ID: DA27B68C1D10203C

View File

@ -14,8 +14,8 @@ const libraries = [
lib: {
entry: './lib/ui.js',
name: 'lib-ui',
formats: ['umd'],
fileName: (_format, name) => `${name}.min.js`
formats: ['cjs', 'umd'],
fileName: (format, name) => format === 'cjs' ? `${name}-cjs.min.js` : `${name}.min.js`
},
rollupOptions: {
output: {