feat: add vite-layers

This commit is contained in:
2026-06-07 17:34:31 +07:00
parent aa3148f4e4
commit ecc958c9f0
94 changed files with 4149 additions and 248 deletions
@@ -0,0 +1,18 @@
import vue from '@vitejs/plugin-vue'
import { defineLayerConfig } from '../../../src/index.ts'
export default defineLayerConfig({
name: 'main',
features: { billing: true, p2p: true },
// The framework plugin lives in the layer config, not in vite-layers' core.
vite: {
plugins: [vue()],
build: { rolldownOptions: { input: { main: '@/main.ts' } } },
},
// Per-layer tsconfig tweaks (merged across the stack, like Nuxt's typescript.tsConfig).
tsConfig: { compilerOptions: { jsx: 'preserve', jsxImportSource: 'vue' } },
$production: {
features: { p2p: false },
}
})