Skip to content

[Question] Is there any way to transpile to vanilla js? No commonjs or adm. #3322

Closed
@ericmdantas

Description

@ericmdantas

Hello!

I'm trying to build a module that the user (developer) will consume by either using:

  • Pure javascript: He'll have my class loaded in the global scope, for example.
  • Commonjs: He'll be able to call it using require - and maybe with SystemJS.
  • AMD: He'll be able to use it with RequireJS and maybe with SystemJS.
  • ES6: He'll be able to use it with the ES6 syntax.

So, right now I'm using gulp-typescript to transpile my code to the dist folder. I transpile once for commonjs, once for amd, once for es6.. but it seems that there's no way to transpile to pure Javascript (other than using the module syntax inside my .ts file).

Is there any way to accomplish this?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions