0

My current workflow, which is ES6-like but does not use module loading, is to use a Gulp task that runs my TypeScript code through tsc, producing ES6 output, and then again through Babel, producing ES5 output. I do this because TypeScript does not yet support async/await when outputting ES5 directly.

I would now like to start doing proper ES6 module-loading, which means I need a compatible bundler.

Does JSPM, Webpack, or anyone else support this double-transpiling process?

David Pfeffer
  • 38,869
  • 30
  • 127
  • 202

1 Answers1

1

Webpack supports it - you can chain loaders. It would be sothing like following in webpack loaders configuration:

{test: /\.ts$/, loaders: ['babel', 'ts-loader']}

More about webpack loaders: https://webpack.github.io/docs/using-loaders.html

Bogdan Savluk
  • 6,274
  • 1
  • 30
  • 36
  • Awesome! Crossing my fingers that someone else answers with a jspm solution, which is my preference, but if not, you win. :) – David Pfeffer May 22 '16 at 19:04