@memo28/vitebuild

vite config helper
787
Install
npm install @memo28/vitebuild
Latest Version:3.0.20
Vue:3
License:MIT
Last Updated:May 2, 2024
Links: npm
Maintainer: hooks_28

@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: '' })

Related Packages

@basmilius/vite-preset

Commonly used presets used in Vite + Vue setups.

21,775 0
vite-plugin-vue2

Vite plugin for Vue2

1,474,659 618
@vue-vine/vite-plugin

Official Vite plugin for Vue Vine

95,680 1,442
vite-plugin-git-revision

Vite plugin that generates VERSION and COMMITHASH files during build based on a...

21,961 11
vite-plugin-resolve-extension-vue

A temporary workaround for issue No loader is configured for ".vue"

6,993 5

Version History

Version Released Vue License
3.0.20 ^3.3.4 MIT
3.0.19 ^3.3.4 MIT
3.0.18 ^3.3.4 MIT
3.0.17 ^3.3.4 MIT
3.0.16 ^3.3.4 MIT