Use esbuild for jsrunner
This commit is contained in:
parent
7186addb5c
commit
eb69b36aac
|
@ -181,6 +181,16 @@
|
|||
"target": "build"
|
||||
}
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"dependsOn": [
|
||||
{
|
||||
"projects": [
|
||||
"@budibase/string-templates"
|
||||
],
|
||||
"target": "build:esbuild"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue