frankwallis / plugin-typescript

TypeScript loader for SystemJS
MIT License
248 stars 47 forks source link

Server-side stand-alone transpilation #182

Closed lastmjs closed 7 years ago

lastmjs commented 7 years ago

How would I go about using this plugin to transpile from within NodeJS? I'm working on a project that intercepts http requests for files, and I would like to transpile the requested file on the server and send up the result. I would then like the browser to request each file's import dependencies individually so that http requests are performed for each import. This is the behavior when using plugin-typescript and SystemJS to transpile in the browser, but I want to optimize by doing the transpilation on the server.

lastmjs commented 7 years ago

Actually, though this might be useful, I think I'm finding what I need from systemjs-builder itself. I'll post updates if I can figure things out. This issue is very helpful: https://github.com/systemjs/builder/issues/727

lastmjs commented 7 years ago

I've more or less figured out what I need. In systemjs-builder, the compile method does exactly what I wanted. Thanks!