31 lines
658 B
TypeScript
31 lines
658 B
TypeScript
import { defineConfig } from 'vite'
|
|
import path from 'path'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src'),
|
|
'@KTXC': path.resolve(__dirname, '../../core/src')
|
|
},
|
|
},
|
|
build: {
|
|
outDir: 'static',
|
|
sourcemap: true,
|
|
lib: {
|
|
entry: path.resolve(__dirname, 'src/main.ts'),
|
|
formats: ['es'],
|
|
fileName: () => 'module.mjs',
|
|
},
|
|
rollupOptions: {
|
|
external: [
|
|
'pinia',
|
|
'vue',
|
|
'vue-router',
|
|
// Externalize shared utilities from core to avoid duplication
|
|
/^@KTXC\/utils\//,
|
|
],
|
|
},
|
|
},
|
|
})
|