https://github.com/lulu-berlin/webpack-typescript-async
Asynchronous module loading with webpack and typescript
https://github.com/lulu-berlin/webpack-typescript-async
asynchronous lazy-loading typescript webpack
Last synced: 2 months ago
JSON representation
Asynchronous module loading with webpack and typescript
- Host: GitHub
- URL: https://github.com/lulu-berlin/webpack-typescript-async
- Owner: lulu-berlin
- Created: 2017-03-01T21:40:04.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-01T23:26:11.000Z (over 9 years ago)
- Last Synced: 2025-05-16T07:08:36.401Z (about 1 year ago)
- Topics: asynchronous, lazy-loading, typescript, webpack
- Language: TypeScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# webpack-typescript-async
This repository is a proof of concept for using webpack with typescript with
``System.import`` for asynchronous module loading.
``System.import`` is better than ``require.ensure`` since it provides
a ``Promise`` and allows to handle exceptions. In order to use it with
typescript, I included the types for systemjs (``@types/systemjs``).
Systemjs is not actually used in the project. The typescript code is compiled
with ``"module": "commonjs"``, but ``System.import`` is recognized by webpack
and converted into bundles that are loaded asynchronously.
## How to start?
```sh
git clone https://github.com/yever/webpack-typescript-async.git
cd webpack-typescript-async
npm install
npm start
```
You can also build it with
```sh
npm run build
```