@bebasebuild/basebuild
v3.0.0-beta.1
Published
basebuild is the core project to build your own dev ecosystem.
Downloads
228
Readme
📦 WHAT
Centralizing all development environment and all build flux of multiple projects at once.
We're moving to a new approach, now we can create multiple ecosystems in the agnostic way. basebuild will have strategies to different ecosystems and for now we're starting on Vite's context.
It makes your vite config reusable between your projects.
🧐 WHY
Now you can create your own project's ecosystem based on your favorite module bundler settings.
Usage
Vite's Ecosystem Example
To only aggregate config objects or config functions
import basebuild from '@bebasebuild/basebuild'
import { UserConfigFnObject } from 'vite'
basebuild<UserConfigFnObject>({
configSystem: 'vite',
configs: [
configFunction1,
configFunction2,
configFunction3,
]
})
Other Cases
import basebuild from '@bebasebuild/basebuild'
import vue from '@vitejs/plugin-vue'
import { UserConfigFnObject } from 'vite'
export const basebuildVue = (userConfigFn) => {
const bbVueConfigFn = ({ command, basebuild }) => {
return {
plugins: [
...basebuild.defaults.plugins, // rollup-plugin-copy plugin
vue()
]
}
}
return basebuild<UserConfigFnObject>({
configSystem: 'vite',
configs: [
bbVueConfigFn,
userConfigFn
]
})
}
import basebuildVue from '@bebasebuild/basebuild-vue'
import { splitVendorChunkPlugin } from 'vite'
export default basebuildVue(({ command, basebuild }) => {
return {
plugins: [
...basebuild.defaults.plugins,
splitVendorChunkPlugin()
] // now it should be [rollup-plugin-copy, vite-plugin-vue, vite-plugin-split-vendor-chunk]
}
})