diff --git a/vite.build.js b/vite.build.js index 906f2c1..9f0b213 100644 --- a/vite.build.js +++ b/vite.build.js @@ -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: {