Skip to content

Target es6 for esm build #378

Closed
Closed
@canadaduane

Description

@canadaduane

Description of the bug

Previously, I could use postprocessing in my webpack bundling without any additional processing (e.g. babel). Recently, however, it appears the language target has moved to "esnext" which includes language features such as "??" and "?." which are less compatible. Specifically, the build/postprocessing.esm.js generated file includes these esnext features.

To Reproduce

Run pnpm build and inspect the build/postprocessing.esm.js file to see that it includes ?? and ?. operators.

Expected behavior

Produce a plain "es6" target.

Library versions used

  • Three: n/a
  • Post Processing: main

Potential Solution

The https://github.com/pmndrs/postprocessing/blob/main/esbuild.mjs#L69 instructions do not include target: "es6", but I believe adding this would solve the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    supportUser support and general help

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions