ambar / vscode-bundle-size

Display the bundle size of npm packages: https://marketplace.visualstudio.com/items?itemName=ambar.bundle-size
35 stars 1 forks source link

FR: Support TypeScript decorators #12

Closed elijaholmos closed 10 months ago

elijaholmos commented 1 year ago

I have discovered that the extension does not work with Typescript decorators. With a file of the following structure:

import { UseGuards } from '@nestjs/common';
import { Args, Mutation, Parent, Query, ResolveField, Resolver } from '@nestjs/graphql';

@Resolver('User')
export class UserResolver { ... }

the extension provides the following error:

2023-07-25T18:00:29.951Z extension measure:error [SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (4:0)]

If possible, it would be nice for this extension to function properly in TypeScript files that contain decorators.

ambar commented 1 year ago

https://github.com/evanw/esbuild/issues/104

ambar commented 10 months ago

The latest v1.6.1 adds support for experimental decorators, please let me know if you have any problems!