Browse Source

fix: cdn minify bug 3.3.3

richard1015 2 years ago
parent
commit
271f15c058
1 changed files with 2 additions and 8 deletions
  1. 2 8
      vite.config.build.ts

+ 2 - 8
vite.config.build.ts

@@ -1,13 +1,6 @@
 import { defineConfig } from 'vite';
-import dts from 'vite-plugin-dts';
 import vue from '@vitejs/plugin-vue';
 import path from 'path';
-import config from './package.json';
-const banner = `/*!
-* ${config.name} v${config.version} ${new Date()}
-* (c) 2022 @jdf2e.
-* Released under the MIT License.
-*/`;
 
 export default defineConfig({
   resolve: {
@@ -36,11 +29,12 @@ export default defineConfig({
       // 请确保外部化那些你的库中不需要的依赖
       external: ['vue', 'vue-router'],
       output: {
-        banner,
         // 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
         globals: {
           vue: 'Vue'
         },
+        exports: 'named',
+        entryFileNames: `nutui.umd.js`,
         plugins: []
       }
     },