From dee85857f9d1ba1e88324400c9e8b5d5b758eee8 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 27 Nov 2024 11:12:39 +0100 Subject: [PATCH] bbui use alias instead of packages --- packages/bbui/vite.config.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/bbui/vite.config.js b/packages/bbui/vite.config.js index 3d8afe8c07..4c7da1c43e 100644 --- a/packages/bbui/vite.config.js +++ b/packages/bbui/vite.config.js @@ -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"), + }, + }, })