A module bundler for TypeScript
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
scripts
src
.gitignore
.npmignore
LICENSE
README.md
package.json

README.md

npm version

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"
      ]
    }
  ]
}