ecl1ps / wp-multiple-tsconfigs

Example WebPack configuration for building TypeScript app with multiple target environments.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

wp-multiple-tsconfigs

This is an example WebPack configuration for building TypeScript app with multiple target environments. Environments in this case are regular window scope and webworker scope. Web workers don't have access to DOM and other features and this fact should be also respected and enforced by build process.

Solution

The solution lies in using multiple exported Webpack configurations. Every configuration is using its own tsconfig with libs configuration reflection the target environment during build-time.

About

Example WebPack configuration for building TypeScript app with multiple target environments.

License:MIT License


Languages

Language:JavaScript 80.0%Language:TypeScript 20.0%