Use esbuild for jsrunner
This commit is contained in:
parent
7186addb5c
commit
eb69b36aac
|
@ -181,6 +181,16 @@
|
||||||
"target": "build"
|
"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 { setJSRunner } from "@budibase/string-templates"
|
||||||
import { context } from "@budibase/backend-core"
|
import { context } from "@budibase/backend-core"
|
||||||
import tracer from "dd-trace"
|
import tracer from "dd-trace"
|
||||||
import { readFileSync } from "fs"
|
import fs from "fs"
|
||||||
|
|
||||||
const helpersSource = readFileSync(
|
const helpersSource = fs.readFileSync(
|
||||||
"node_modules/@budibase/string-templates/dist/bundle.mjs",
|
`${require.resolve("@budibase/string-templates/index-helpers")}`,
|
||||||
"utf8"
|
"utf8"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,8 @@
|
||||||
"require": "./src/index.cjs",
|
"require": "./src/index.cjs",
|
||||||
"import": "./dist/bundle.mjs"
|
"import": "./dist/bundle.mjs"
|
||||||
},
|
},
|
||||||
"./package.json": "./package.json"
|
"./package.json": "./package.json",
|
||||||
|
"./index-helpers": "./dist/index-helpers.bundled.js"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist",
|
"dist",
|
||||||
|
|
Loading…
Reference in New Issue