Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Suppose I'm building a typescript based application which wants to use some cool functions from another javascript developer. That developer is old school and has his javascript code written in direct system.register module format or even as IIFE function.

How would I use that developers code from typescript as well as how do I tell webpack to bundle that external code along with my code (which are in different module format)?

Does that developer have to recompile his logic into ES6 or Typescript based Js?

Incase there are d.ts files for other library, that will solve compile type problem. How will webpack (or some other module bundler) combine everything to some common module format?

What I have tried:

Built a sample application typescript application which references modules from other folders.

Bundled the application with webpack but the final output has javascript errors.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900