Skip to content

Failed to compile: logicalAssignment operator #30

@ericpyle

Description

@ericpyle

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions