@memo28/vitebuild
v3.0.20
Published
vite config helper
Downloads
9
Readme
@memo28/vitebuild
useag
// in vue.js
export default defineConfig(new Engine().setTechnologyStack('vue').addPlugins().getBuildConfig())
// in react.js
export default defineConfig(new Engine().setTechnologyStack('react').addPlugins().getBuildConfig())
setTechnologyStack
定义技术栈返回指定技术栈默认插件
react
@vitejs/plugin-legacy
@vitejs/plugin-react-swc
vite-plugin-print-urls
vue
@vitejs/plugin-legacy
vite-plugin-print-urls
@vitejs/plugin-vue
@vitejs/plugin-vue-jsx
unplugin-vue-macros/vite
new Engine().setTechnologyStack('react').getBuildConfig()
addPlugins
添加插件助手
new Engine()
.setTechnologyStack('react')
.addPlugins(plugins => {
plugins.addAlias(config).addSassDts(config)
})
.getBuildConfig({ root: '', plugins: [] })
getBuildConfig
返回所有配置参数
new Engine().setTechnologyStack('react').getBuildConfig({ root: '' })