From 971ec2e0b1651c15938f3322ac710ce99533fabd Mon Sep 17 00:00:00 2001 From: Matt Quinlan <37664854+mattquinlan440@users.noreply.github.com> Date: Fri, 18 Aug 2023 15:24:08 -0400 Subject: [PATCH] adjust babel config for testing in consuming packages (#21) # Thanks for opening a Pull Request ## Changes Are there any breaking changes you are aware of in the PR? No ## General Checklist * [ ] Change is tested locally * [ ] Demo is updated to exercise change (if applicable) * [ ] [WIP] flag is removed from the title [1]:https://docs.npmjs.com/about-semantic-versioning [2]:https://docs.npmjs.com/cli/deprecate [3]:https://github.com/meltwater/applet-orchard/blob/master/docs/README.md --- .babelrc | 5 +++++ package-lock.json | 5 +++-- package.json | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.babelrc b/.babelrc index 590f470..8db4ac7 100644 --- a/.babelrc +++ b/.babelrc @@ -8,5 +8,10 @@ } } ] + ], + "plugins": [ + ["@babel/plugin-transform-modules-commonjs", { + "loose": true + }] ] } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 37cec66..e1d2f61 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,11 +18,12 @@ "sywac": "1.3.0" }, "bin": { - "orchard": "dist/cli.entry.js" + "orchard": "cjs/cli.entry.js" }, "devDependencies": { "@babel/cli": "7.22.10", "@babel/core": "7.22.10", + "@babel/plugin-transform-modules-commonjs": "7.22.5", "@babel/preset-env": "7.22.10", "@babel/register": "7.22.5", "eslint": "8.46.0", @@ -31,7 +32,7 @@ "nodemon": "3.0.1" }, "engines": { - "node": ">= 18.0.0" + "node": ">= 16.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package.json b/package.json index 03cecab..211f18d 100644 --- a/package.json +++ b/package.json @@ -35,6 +35,7 @@ "devDependencies": { "@babel/cli": "7.22.10", "@babel/core": "7.22.10", + "@babel/plugin-transform-modules-commonjs": "7.22.5", "@babel/preset-env": "7.22.10", "@babel/register": "7.22.5", "eslint": "8.46.0",