glimmerjs / glimmer-blueprint

[MOVED] This package is now part of the Glimmer.js monorepo
https://github.com/glimmerjs/glimmer.js
25 stars 13 forks source link

Add allowJs to default blueprint tsconfig.json. #25

Closed rwjblue closed 7 years ago

rwjblue commented 7 years ago

Our pipeline actually includes *.js files (we transpile *.hbs -> *.js for example).

pittst3r commented 7 years ago

I'm pretty sure this won't work as expected. I think broccoli-typescript-compiler, at some point, clobbers js files (because tsc obviously can handle js files given that option's availability). I think it only appears to be working because of this line.

I experienced this clobbering most recently in @glimmer/application when I had to bundle the precompiled main template in with the package. I had to resort to compiling the template to a .ts extension to get it to make it through the compiler, despite using the allowJs option.

pittst3r commented 7 years ago

Linking this issue: https://github.com/tildeio/broccoli-typescript-compiler/issues/32

rwjblue commented 7 years ago

Yep, I agree. Definitely something fishy going on...

krisselden commented 7 years ago

I highly doubt you want "allowJs": true which means that you want typescript to compile your js and output it.

pittst3r commented 7 years ago

@krisselden That is what we want. We fixed the problem by compiling the hbs to .ts files (instead of to .js) so they don't get clobbered in broccoli-typescript-compiler.