|
|
@@ -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: []
|
|
|
}
|
|
|
},
|