Skip to content

tsconfig.json: is multiple build configurations possible? #2867

Closed
@niemyjski

Description

@niemyjski

What's the best way to accomplish multiple build profiles with tsconfig? I want to have builds that specifically target different platforms like node/browser etc..

{
   es5: {
      compilerOptions: {
        target: 'es5',
      },
      files: [
        'polyfill.ts',
        'index.ts'
      ]
   }
   es6: {
      compilerOptions: {
        target: 'es6',
      },
      files: [
        'index.ts'
      ]
   }
   nodees5: {
      compilerOptions: {
        target: 'es5',
      },
      files: [
        'polyfill.ts',
        'index.ts',
        'nodexyz.ts'
      ]
   }
   nodees6: {
      compilerOptions: {
        target: 'es6',
      },
      files: [
        'index.ts',
        'nodexyz.ts'
      ]
   }
}

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