Skip to content

webpack fails at jsonld because of ES6 code in lib/jsonld.js #252

@flyon

Description

@flyon

webpack fails at jsonld because of the use of "..." in jsonld/lib/jsonld.js which is not ES5.

https://github.com/digitalbazaar/jsonld.js/blob/master/lib/jsonld.js#L1040

ERROR in ./node_modules/jsonld/lib/jsonld.js
Module parse failed: Unexpected token (1040:2)
You may need an appropriate loader to handle this file type.
| function _setDefaults(options, {
|   documentLoader = jsonld.documentLoader,
|   ...defaults
| }) {
|   if(typeof options === 'function') {
 @ ./src/utils/JSONLD.ts 3:15-32
 @ ./src/index.ts
Warning:  Use --force to continue.

Aborted due to warnings.

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