1
0
Fork 0
mirror of synced 2024-10-03 19:43:32 +13:00

Use esbuild for jsrunner

This commit is contained in:
Adria Navarro 2024-01-15 12:30:47 +01:00
parent 7186addb5c
commit eb69b36aac
3 changed files with 15 additions and 4 deletions

View file

@ -181,6 +181,16 @@
"target": "build"
}
]
},
"test": {
"dependsOn": [
{
"projects": [
"@budibase/string-templates"
],
"target": "build:esbuild"
}
]
}
}
}

View file

@ -3,10 +3,10 @@ import env from "./environment"
import { setJSRunner } from "@budibase/string-templates"
import { context } from "@budibase/backend-core"
import tracer from "dd-trace"
import { readFileSync } from "fs"
import fs from "fs"
const helpersSource = readFileSync(
"node_modules/@budibase/string-templates/dist/bundle.mjs",
const helpersSource = fs.readFileSync(
`${require.resolve("@budibase/string-templates/index-helpers")}`,
"utf8"
)

View file

@ -11,7 +11,8 @@
"require": "./src/index.cjs",
"import": "./dist/bundle.mjs"
},
"./package.json": "./package.json"
"./package.json": "./package.json",
"./index-helpers": "./dist/index-helpers.bundled.js"
},
"files": [
"dist",