awoken-bible / reference

NPM package for bible verse reference parsing, formating and meta data
MIT License
11 stars 3 forks source link

Failed to compile: logicalAssignment operator #30

Open ericpyle opened 4 months ago

ericpyle commented 4 months ago

Fails to compile in my create-react-app due to

Failed to compile.

./node_modules/awoken-bible-reference/dist/awoken-ref.esm.mjs
SyntaxError: /home/epyle/repos/ubsicap/sltt/client/node_modules/awoken-bible-reference/dist/awoken-ref.esm.mjs: Support for the experimental syntax 'logicalAssignment' isn't currently enabled (13:22):

  11 | var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
  12 | var __spreadValues = (a, b) => {
> 13 |   for (var prop in b ||= {})
     |                      ^
  14 |     if (__hasOwnProp.call(b, prop))
  15 |       __defNormalProp(a, prop, b[prop]);
  16 |   if (__getOwnPropSymbols)

Add @babel/plugin-proposal-logical-assignment-operators (https://git.io/vAlRe) to the 'plugins' section of your Babel config to enable transformation.

If you don't need to use the logicalAssignment operator, it would make it easier for me to use this library in my legacy app.