1 Star 0 Fork 144

lonely_my/heyui

forked from heyui/heyui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
vite.config.js 1.39 KB
一键复制 编辑 原始数据 按行查看 历史
vvpvvp 提交于 2021-12-06 20:42 . feat: 补充逻辑
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
const path = require('path');
// https://vitejs.dev/config/
const config = defineConfig({
plugins: [vue()],
target: 'es2015',
build: {
outDir: path.resolve(__dirname, './dist'),
lib: {
entry: path.resolve(__dirname, './src/index.js'),
name: 'HeyUI'
},
rollupOptions: {
context: 'globalThis',
preserveEntrySignatures: 'strict',
external: ['vue'],
output: [
{
format: 'umd',
exports: 'named',
sourcemap: false,
entryFileNames: 'heyui.js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]',
namespaceToStringTag: true,
inlineDynamicImports: false,
manualChunks: undefined,
globals: { vue: 'Vue' }
},
{
format: 'es',
exports: 'named',
sourcemap: false,
entryFileNames: 'heyui.esm.js',
chunkFileNames: '[name].js',
assetFileNames: '[name].[ext]',
namespaceToStringTag: true,
inlineDynamicImports: false,
manualChunks: undefined,
globals: { vue: 'Vue' }
}
]
}
},
resolve: {
alias: {
heyui: path.resolve(__dirname, './src')
},
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
}
});
export default config;
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/lonely_my/heyui.git
git@gitee.com:lonely_my/heyui.git
lonely_my
heyui
heyui
master

搜索帮助