bbui use alias instead of packages
This commit is contained in:
parent
f8855bb0c1
commit
dee85857f9
|
@ -1,12 +1,9 @@
|
||||||
import { defineConfig } from "vite"
|
import { defineConfig } from "vite"
|
||||||
import { svelte } from "@sveltejs/vite-plugin-svelte"
|
import { svelte } from "@sveltejs/vite-plugin-svelte"
|
||||||
import postcss from "postcss"
|
import postcss from "postcss"
|
||||||
|
import path from "path"
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
// https://vite.dev/guide/dep-pre-bundling#monorepos-and-linked-dependencies
|
|
||||||
optimizeDeps: {
|
|
||||||
include: ["shared-core"],
|
|
||||||
},
|
|
||||||
build: {
|
build: {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
lib: {
|
lib: {
|
||||||
|
@ -14,9 +11,6 @@ export default defineConfig({
|
||||||
formats: ["es"],
|
formats: ["es"],
|
||||||
fileName: "bbui.es",
|
fileName: "bbui.es",
|
||||||
},
|
},
|
||||||
commonjsOptions: {
|
|
||||||
include: [/shared-core/, /node_modules/],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
svelte({
|
svelte({
|
||||||
|
@ -26,4 +20,10 @@ export default defineConfig({
|
||||||
css: {
|
css: {
|
||||||
postcss,
|
postcss,
|
||||||
},
|
},
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
"@budibase/shared-core": path.resolve(__dirname, "../shared-core/src"),
|
||||||
|
"@budibase/types": path.resolve(__dirname, "../types/src"),
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue