From 6b3c4ec651eb73964dcb3aeba45ded7adbb5a36b Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Wed, 21 Feb 2024 20:44:15 +0100 Subject: [PATCH] Update entrypoints --- packages/string-templates/package.json | 7 ++---- packages/string-templates/rollup.config.js | 6 ++--- packages/string-templates/src/index.mjs | 26 ---------------------- 3 files changed, 5 insertions(+), 34 deletions(-) delete mode 100644 packages/string-templates/src/index.mjs diff --git a/packages/string-templates/package.json b/packages/string-templates/package.json index 1e01a18a03..754e058bda 100644 --- a/packages/string-templates/package.json +++ b/packages/string-templates/package.json @@ -3,15 +3,12 @@ "type": "module", "version": "0.0.0", "description": "Handlebars wrapper for Budibase templating.", - "main": "src/index.js", + "main": "dist/index.cjs", "module": "src/index.mjs", "license": "MPL-2.0", "types": "dist/index.d.ts", "exports": { - ".": { - "require": "./src/index.js", - "import": "./src/index.mjs" - }, + ".": "./src/index.mjs", "./package.json": "./package.json", "./test/utils": "./test/utils.js" }, diff --git a/packages/string-templates/rollup.config.js b/packages/string-templates/rollup.config.js index d7f45489c9..199a328022 100644 --- a/packages/string-templates/rollup.config.js +++ b/packages/string-templates/rollup.config.js @@ -10,11 +10,11 @@ const production = !process.env.ROLLUP_WATCH export default [ { - input: "src/index.mjs", + input: "src/index.js", output: { sourcemap: !production, - format: "esm", - file: "./dist/bundle.mjs", + format: "cjs", + file: "./dist/bundle.cjs", }, plugins: [ resolve({ diff --git a/packages/string-templates/src/index.mjs b/packages/string-templates/src/index.mjs deleted file mode 100644 index 39ab10f75d..0000000000 --- a/packages/string-templates/src/index.mjs +++ /dev/null @@ -1,26 +0,0 @@ -/** - * ES6 entrypoint for rollup - */ -export { - isValid, - makePropSafe, - getManifest, - isJSBinding, - encodeJSBinding, - decodeJSBinding, - processStringSync, - processObjectSync, - processString, - processObject, - doesContainStrings, - doesContainString, - disableEscaping, - findHBSBlocks, - convertToJS, - setJSRunner, - setOnErrorLog, - FIND_ANY_HBS_REGEX, - helpersToRemoveForJs, -} from "./index.js" - -export * from "./errors.js"