Skip to content

I don't know if this is a mistake #1737

Closed

Description

@jxh150535011

I want some modules in node.modules to be compiled using typescript instead of esbuild

plugins: [
  typescript({
    include: [
      "/Volumes/xx_module/src/**/*.ts",
    ],
  }),
]

I check the output format of the class file to determine if it is effective:

// invalid
export class xx extends xxBase {
}
__decorateClass([fn()], xx.prototype, "xxProp", 2);

The correct way to build the output through tlibs is as follows:

// valid
export class xx extends xxBase {
}
__decorate([
  fn(),
  __metadata("design:type", Array)
], xx.prototype, "xxProp", void 0);

I must add the above path to both tsconfig.json and typescript()'s include in order to obtain the correct result:


plugins: [
  typescript({
    include: [
      "/Volumes/xx_module/src/**/*.ts",
    ],
  }),
]

tsconfig.json

include: [
 "/Volumes/xx_module/src/**/*.ts",
]

I don't know what caused this

Activity

  1. locked and limited conversation to collaborators on Jun 14, 2024
  2. converted this issue into a discussion #1738 on Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions