Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Babel version to support Class Properties #397

Open
Dimava opened this issue Aug 26, 2024 · 0 comments
Open

Update Babel version to support Class Properties #397

Dimava opened this issue Aug 26, 2024 · 0 comments

Comments

@Dimava
Copy link

Dimava commented Aug 26, 2024

When I'm trying to get https://unpkg.com/[email protected]/out/scope.js?module I'm getting an error:

Cannot generate module for [email protected]/out/scope.js

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

   9 | import { InternalTypeParser } from "./type.js";
  10 | export class InternalScope extends BaseScope {
> 11 |     parseCache = {};
     |                ^
  12 |     preparseAlias(k, v) {
  13 |         const firstParamIndex = k.indexOf("<");
  14 |         if (firstParamIndex === -1)

Add @babel/plugin-proposal-class-properties (https://git.io/vb4SL) to the 'plugins' section of your Babel config to enable transformation.

https://caniuse.com/mdn-javascript_classes_public_class_fields is supported in all browsers for quite a while

Please update Babel and other dep versions to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant