Fix svelte issues
This commit is contained in:
parent
648db248dc
commit
cec2f88c25
|
@ -7,7 +7,6 @@
|
|||
"@typescript-eslint/parser": "5.45.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"esbuild": "^0.17.18",
|
||||
"esbuild-svelte": "^0.7.3",
|
||||
"eslint": "^7.28.0",
|
||||
"eslint-plugin-cypress": "^2.11.3",
|
||||
"eslint-plugin-svelte3": "^3.2.0",
|
||||
|
@ -45,7 +44,7 @@
|
|||
"kill-all": "yarn run kill-builder && yarn run kill-server",
|
||||
"dev": "yarn run kill-all && lerna link && lerna run --stream --parallel dev:builder --concurrency 1 --stream",
|
||||
"dev:noserver": "yarn run kill-builder && lerna link && lerna run --stream dev:stack:up && lerna run --stream --parallel dev:builder --concurrency 1 --ignore @budibase/backend-core --ignore @budibase/server --ignore @budibase/worker",
|
||||
"dev:server": "yarn run kill-server && lerna run --stream --parallel dev:builder --concurrency 1 --scope @budibase/worker --scope @budibase/server",
|
||||
"dev:server": "yarn run kill-server && lerna run --stream --parallel dev:builder --concurrency 1 --scope @budibase/worker --scope @budibase/server",
|
||||
"dev:built": "yarn run kill-all && cd packages/server && yarn dev:stack:up && cd ../../ && lerna run --stream --parallel dev:built",
|
||||
"test": "lerna run --stream test --stream",
|
||||
"lint:eslint": "eslint packages && eslint qa-core",
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
"tsbuild": "tsc -p tsconfig.build.json && mv dist/src/* dist/ && rimraf dist/src/",
|
||||
"build:dev": "yarn prebuild && tsc --build --watch --preserveWatchOutput",
|
||||
"debug": "yarn build && node --expose-gc --inspect=9222 dist/index.js",
|
||||
"postbuild": "copyfiles -u 1 src/**/*.svelte dist/ && copyfiles -u 1 src/**/*.hbs dist/ && copyfiles -u 1 src/**/*.json dist/",
|
||||
"test": "bash scripts/test.sh",
|
||||
"test:memory": "jest --maxWorkers=2 --logHeapUsage --forceExit",
|
||||
"test:watch": "jest --watch",
|
||||
|
|
|
@ -134,7 +134,7 @@ export const serveApp = async function (ctx: any) {
|
|||
? objectStore.getGlobalFileUrl("settings", "logoUrl")
|
||||
: "",
|
||||
})
|
||||
const appHbs = loadHandlebarsFile(`${__dirname}/templates/app.hbs`)
|
||||
const appHbs = loadHandlebarsFile(`${__dirname}/app.hbs`)
|
||||
ctx.body = await processString(appHbs, {
|
||||
head,
|
||||
body: html,
|
||||
|
@ -161,7 +161,7 @@ export const serveApp = async function (ctx: any) {
|
|||
: "",
|
||||
})
|
||||
|
||||
const appHbs = loadHandlebarsFile(`${__dirname}/templates/app.hbs`)
|
||||
const appHbs = loadHandlebarsFile(`${__dirname}/app.hbs`)
|
||||
ctx.body = await processString(appHbs, {
|
||||
head,
|
||||
body: html,
|
||||
|
@ -177,7 +177,7 @@ export const serveBuilderPreview = async function (ctx: any) {
|
|||
|
||||
if (!env.isJest()) {
|
||||
let appId = context.getAppId()
|
||||
const previewHbs = loadHandlebarsFile(`${__dirname}/templates/preview.hbs`)
|
||||
const previewHbs = loadHandlebarsFile(`${__dirname}/preview.hbs`)
|
||||
ctx.body = await processString(previewHbs, {
|
||||
clientLibPath: objectStore.clientLibraryUrl(appId!, appInfo.version),
|
||||
})
|
||||
|
|
|
@ -7,7 +7,6 @@ const fs = require("fs")
|
|||
const path = require("path")
|
||||
|
||||
const { build } = require("esbuild")
|
||||
const sveltePlugin = require("esbuild-svelte")
|
||||
|
||||
const { default: NodeResolve } = require("@esbuild-plugins/node-resolve")
|
||||
|
||||
|
@ -17,13 +16,14 @@ 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,
|
||||
minify: !isDev,
|
||||
sourcemap: isDev,
|
||||
tsconfig,
|
||||
plugins: [
|
||||
sveltePlugin(),
|
||||
NodeResolve({
|
||||
extensions: [".ts", ".js"],
|
||||
onResolved: resolved => {
|
||||
|
@ -38,7 +38,10 @@ function runBuild(entry, outfile) {
|
|||
],
|
||||
target: "node14",
|
||||
preserveSymlinks: true,
|
||||
external: isDev ? ["@budibase/client"] : [],
|
||||
loader: {
|
||||
".svelte": "copy",
|
||||
},
|
||||
external: [...(isDev && devExternals)],
|
||||
}
|
||||
|
||||
build({
|
||||
|
|
|
@ -10570,11 +10570,6 @@ esbuild-sunos-64@0.15.18:
|
|||
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz#fd528aa5da5374b7e1e93d36ef9b07c3dfed2971"
|
||||
integrity sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw==
|
||||
|
||||
esbuild-svelte@^0.7.3:
|
||||
version "0.7.3"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-svelte/-/esbuild-svelte-0.7.3.tgz#676c49b3892215fc706e73d24b03d0ed83c50ccf"
|
||||
integrity sha512-aq4PjZowV2LhW5U6KYKDkaHiAp9q/NquthbX1tddGRGYrlaBBGgDNis58jNU4wU6+iHsNWfLVsg8G3W6ccszdw==
|
||||
|
||||
esbuild-windows-32@0.15.18:
|
||||
version "0.15.18"
|
||||
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz#0e92b66ecdf5435a76813c4bc5ccda0696f4efc3"
|
||||
|
|
Loading…
Reference in New Issue