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"