From d296dd01fd3258f8d3407224e592e39947061de7 Mon Sep 17 00:00:00 2001 From: Tsanie Lily Date: Fri, 7 Jun 2024 16:32:50 +0800 Subject: [PATCH] add cjs-dist format --- vite.build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: {