Fix build

This commit is contained in:
Adria Navarro 2023-05-03 17:51:06 +01:00
parent cec2f88c25
commit efaf2adf05
2 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { join } from "path"
import path, { join } from "path"
import { ObjectStoreBuckets } from "../../constants"
import fs from "fs"
import { objectStore } from "@budibase/backend-core"
@ -93,10 +93,10 @@ export async function updateClientLibrary(appId: string) {
let manifest, client
if (env.isDev()) {
const path = devClientLibPath()
const clientPath = devClientLibPath()
// Load the symlinked version in dev which is always the newest
manifest = join(path, "manifest.json")
client = path
manifest = join(path.dirname(path.dirname(clientPath)), "manifest.json")
client = clientPath
} else {
// Load the bundled version in prod
manifest = resolve(TOP_LEVEL_PATH, "client", "manifest.json")

View File

@ -16,7 +16,6 @@ function runBuild(entry, outfile) {
const isDev = process.env.NODE_ENV !== "production"
const tsconfig = argv["p"] || `tsconfig.build.json`
const devExternals = isDev ? ["@budibase/client"] : []
const sharedConfig = {
entryPoints: [entry],
bundle: true,
@ -41,7 +40,6 @@ function runBuild(entry, outfile) {
loader: {
".svelte": "copy",
},
external: [...(isDev && devExternals)],
}
build({