Skip to content

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

License

Notifications You must be signed in to change notification settings

ecl1ps/wp-multiple-tsconfigs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks