Skip to content

build error if package contains ES2020 features (in this case, optional chaining) #413

Closed
@sndrs

Description

Type

Feature Request

support ES2020 in packages

Package name

@guardian/libs

Entire error (stringified) I see in my browser console

tmp/tmp-build/packages/build-@guardianlibs-VCG/node_modules/@guardian/libs/dist/esm/loadScript.js 15:8 Module parse failed: Unexpected token (15:8) File was processed with these loaders: * ./node_modules/shebang-loader/index.js You may need an additional loader to handle the result of these loaders. | }; | const ref = document.scripts[0]; > ref?.parentNode?.insertBefore(script, ref); | }); | @ /tmp/tmp-build/packages/build-@guardianlibs-VCG/node_modules/@guardian/libs/dist/esm/index.js 1:0-42 1:0-42 @ /tmp/tmp-build/packages/build-@guardianlibs-VCG/index.js

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions