mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
The Vite alias 'base' -> '@hanzo/base/compat' failed in Docker because the file:../sdk/base-js link can't resolve when only ui/ is copied into the build context. Since @hanzo/base/compat is just a re-export of the pocketbase package, alias 'base' directly to 'pocketbase' and add it as a direct devDependency, removing the file: link.
33 lines
792 B
JavaScript
33 lines
792 B
JavaScript
import { defineConfig } from 'vite';
|
|
import { svelte, vitePreprocess } from '@sveltejs/vite-plugin-svelte';
|
|
|
|
// see https://vitejs.dev/config
|
|
export default defineConfig({
|
|
server: {
|
|
port: 7777,
|
|
},
|
|
envPrefix: 'HZ',
|
|
base: './',
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
reportCompressedSize: false,
|
|
},
|
|
plugins: [
|
|
svelte({
|
|
preprocess: [vitePreprocess()],
|
|
onwarn: (warning, handler) => {
|
|
if (warning.code.startsWith('a11y-')) {
|
|
return; // silence a11y warnings
|
|
}
|
|
handler(warning);
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': __dirname + '/src',
|
|
'base': 'pocketbase',
|
|
}
|
|
},
|
|
})
|