An open API service indexing awesome lists of open source software.

https://github.com/domchen/tspack

A module bundler for TypeScript
https://github.com/domchen/tspack

Last synced: 9 months ago
JSON representation

A module bundler for TypeScript

Awesome Lists containing this project

README

          

[![npm version](https://badge.fury.io/js/tspack.svg)](https://badge.fury.io/js/tspack)

# Introduction

tspack is a bundler for typescript modules. Packs many modules into a few bundled assets. Allows to split your codebase into multiple bundles, which can be loaded on demand.

# Installation

project:
`npm install tspack`

global:
`npm install tspack -g`

# Example

tsconfig.json :

```
{
"compilerOptions": {
"outDir": "bin-debug",
"target": "ES5",
"declaration": true,
"accessorOptimization": true,
"emitReflection": true,
"reorderFiles": true,
"defines": {
"DEBUG": false,
"LANGUAGE": "en_US"
}
},
"modules": [
{
"name": "core",
"include": [
"src/**/*"
],
"exclude": [
"**/web/*",
"node_modules"
],
"dependencies": []
},
{
"name": "web",
"declaration": false, // Override the default compiler options defined above.
"include": [
"src/**/web/*"
],
"exclude": [
"node_modules"
],
"dependencies": [
"core"
]
}
]
}

```