This project has moved and is read-only. For the latest updates, please go here.
1

Closed

TypeScript: please expose more compiler options

description

Hello! It would be nice to have these compilerOptions configurable:
  • emitDecoratorMetadata
  • experimentalDecorators
  • inlineSourceMap
  • inlineSources
  • jsx
  • reactNamespace
Thanks!
Closed Oct 8, 2016 at 8:26 AM by Taritsyn

comments

Taritsyn wrote Sep 21, 2016 at 11:24 AM

Hello, Dmitrage!

These options were not added, because the functionality, which it enable, will not work correctly in the Bundle Transformer.
  • emitDecoratorMetadata
  • experimentalDecorators
Need to import reflect-metadata Node.js-module.
  • inlineSourceMap
  • inlineSources
Question about the source map support has already been discussed repeatedly.
  • jsx
  • reactNamespace
In Bundle Transformer does not own module for ReactJS. Development of new modules until frozen.

dmitrage wrote Sep 21, 2016 at 12:43 PM

Hello, Andrey.
Let me argue with you.
  • emitDecoratorMetadata
  • experimentalDecorators
Generated helpers just check presense of some Reflect methods in global namespace and use them if available. Also reflect-metadata package can be used in browser.
  • inlineSourceMap
  • inlineSources
These are useful for debugging when TypeScript is the only transformer. Worked for me.
  • jsx
  • reactNamespace
I did not find any problems in my use cases.

Maybe you could enable them with explicit statement like "use if you know what you are doing - expect no support for related issues"?

Anyway, thank you for the quick response and the awesome product of course!

Taritsyn wrote Sep 21, 2016 at 1:37 PM

Also reflect-metadata package can be used in browser.
BundleTransformer.TypeScript does not support external modules (CommonJS, AMD, SystemJS, UMD and ES6 modules).
These are useful for debugging when TypeScript is the only transformer. Worked for me.
Source map support will not be in the Bundle Transformer version 1.X.
I did not find any problems in my use cases.
I think you need to switch to a more powerful tool (Grunt, Gulp or Webpack).

dmitrage wrote Sep 21, 2016 at 2:02 PM

Ok, thanks!