From 6a9d29ab751e775b5ca55ff4aeb7c104210932fe Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Mon, 29 Jul 2024 15:57:38 +0200 Subject: [PATCH] Bundle pro instead of relying on removing backend-core --- scripts/build.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/scripts/build.js b/scripts/build.js index 4383950f88..93a2a1e589 100755 --- a/scripts/build.js +++ b/scripts/build.js @@ -51,20 +51,6 @@ async function runBuild(entry, outfile) { fs.readFileSync(tsconfig, "utf-8") ) - if ( - !fs.existsSync(path.join(__dirname, "../packages/pro/src")) && - tsconfigPathPluginContent.compilerOptions?.paths - ) { - // If we don't have pro, we cannot bundle backend-core. - // Otherwise, the main context will not be shared between libraries - delete tsconfigPathPluginContent?.compilerOptions?.paths?.[ - "@budibase/backend-core" - ] - delete tsconfigPathPluginContent?.compilerOptions?.paths?.[ - "@budibase/backend-core/*" - ] - } - const sharedConfig = { entryPoints: [entry], bundle: true, @@ -75,7 +61,7 @@ async function runBuild(entry, outfile) { svelteCompilePlugin, TsconfigPathsPlugin({ tsconfig: tsconfigPathPluginContent }), nodeExternalsPlugin({ - allowList: ["@budibase/frontend-core", "svelte"], + allowList: ["@budibase/frontend-core", "@budibase/pro", "svelte"], }), ], preserveSymlinks: true,