import.meta Support in SystemJS

TypeScript 3.6 supports transforming import.meta to context.meta when your module target is set to system.

  1. // This module:
  2. console.log(import.meta.url)
  3. // gets turned into the following:
  4. System.register([], function (exports, context) {
  5. return {
  6. setters: [],
  7. execute: function () {
  8. console.log(context.meta.url);
  9. }
  10. };
  11. });