basebuild is the core project to build your own dev ecosystem.
Write once, use everywhere at once! ;)
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.
Now you can create your own project's ecosystem based on your favorite module bundler settings.
📚 More details about the concept
Now we can move to the future on the fly. On the past road, we've past through Gulp's scripts as main resource to create a dev server and build system replicable, but module bundlers have been created and emerged in a surprising and dominant way as the most powerful frontend tool to evolve the present using future core features by loaders, plugins and etc.So, we cannot guess how the future will be like, but we can be resilient with it. The basebuild's core module now have the mission to adapt configurations to different ecosystems of module bundlers in the recursive way and by different layers.
So this way you can create your own project's ecosystem based on your favorite module bundler settings.
This means that you can create a node package centralizing all development environment and all build flux of multiple projects
Some direct basebuildfieds projects will be created for open source community on Vite's ecosystem:
- basebuild-web-extensions: Focus to develop browsers extensions (Mainly Chrome Extensions)
- basebuild-angular: Full rewrite of old package to Vite's system and Angular's apps development.
- basebuild-vue: Focus to develop Vue.js apps
This is limitless, so let's see what the community can do.
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,
]
})
To create a basebuild child project like '@bebasebuild/basebuild-vue'
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
]
})
}
To use the basebuild child project in vite.config.ts of any other projects
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]
}
})