1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/jd-platform-opensource-nutui

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
vite.config.build.ts 1.3 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Eiinu Отправлено 25.03.2024 13:30 41772b4
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
import autoprefixer from 'autoprefixer'
export default defineConfig({
resolve: {
alias: [{ find: '@', replacement: path.resolve(__dirname, './src') }]
},
css: {
preprocessorOptions: {
scss: {
// example : additionalData: `@import "./src/design/styles/variables";`
// dont need include file extend .scss
additionalData: `@import "@/packages/styles/variables.scss";`
}
},
postcss: {
plugins: [
autoprefixer({
overrideBrowserslist: ['> 0.5%', 'last 2 versions', 'ie > 11', 'iOS >= 10', 'Android >= 5']
})
]
}
},
plugins: [vue()],
build: {
minify: true,
target: 'es2015',
rollupOptions: {
// 请确保外部化那些你的库中不需要的依赖
external: ['vue', 'vue-router'],
output: {
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
globals: {
vue: 'Vue'
},
exports: 'named',
plugins: []
}
},
lib: {
entry: 'src/packages/index.build.ts',
name: 'nutui',
fileName: (type) => {
return type === 'umd' ? 'nutui.umd.js' : 'nutui.js'
},
formats: ['umd', 'es']
}
}
})

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/jd-platform-opensource-nutui.git
git@api.gitlife.ru:oschina-mirror/jd-platform-opensource-nutui.git
oschina-mirror
jd-platform-opensource-nutui
jd-platform-opensource-nutui
v4