Skip to content
Snippets Groups Projects

Target es2020 to transpile without class properties syntax

Merged Brian Perry requested to merge issue/api_client-3400583:target-es2020 into canary
All threads resolved!

When requesting JsonApiClient as a module from unpkg like:

https://unpkg.com/@drupal-api-client/json-api-client@0.7.1/dist/index.js?module

It responds with the following syntax error:

Cannot generate module for @drupal-api-client/json-api-client@0.7.1/dist/index.js

SyntaxError: unknown: Support for the experimental syntax 'classProperties' isn't currently enabled (8:49):

The following Vite issue implies that targeting es2020 will prevent this syntax from being used.

I confirmed that it did seem to remove this syntax from the bundle. But the only way I can think to test this on unpkg would be to publish a release.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading