bbui use alias instead of packages

This commit is contained in:
Adria Navarro 2024-11-27 11:12:39 +01:00
parent f8855bb0c1
commit dee85857f9
1 changed files with 7 additions and 7 deletions

View File

@ -1,12 +1,9 @@
import { defineConfig } from "vite"
import { svelte } from "@sveltejs/vite-plugin-svelte"
import postcss from "postcss"
import path from "path"
export default defineConfig({
// https://vite.dev/guide/dep-pre-bundling#monorepos-and-linked-dependencies
optimizeDeps: {
include: ["shared-core"],
},
build: {
sourcemap: true,
lib: {
@ -14,9 +11,6 @@ export default defineConfig({
formats: ["es"],
fileName: "bbui.es",
},
commonjsOptions: {
include: [/shared-core/, /node_modules/],
},
},
plugins: [
svelte({
@ -26,4 +20,10 @@ export default defineConfig({
css: {
postcss,
},
resolve: {
alias: {
"@budibase/shared-core": path.resolve(__dirname, "../shared-core/src"),
"@budibase/types": path.resolve(__dirname, "../types/src"),
},
},
})