Skip to content

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

@jxh150535011

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions