-
Notifications
You must be signed in to change notification settings - Fork 12k
Allow .ts files in angular.json scripts
to be transpiled to target ES version
#17125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The To allow for the behavior as described in the above issue, the |
Hi @denkan why not manually transpiling your TypeScript files with
cheers |
@clydin @flash-me |
Oh didn't see that. Oops 😁. |
Closing as per above comment by @clydin. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🚀 Feature request
Command
Description
There are scenarios where we need to include a specific file to the bundle. Today, we can do this by using the
scripts
option in angular.json. But this only works for .js files.It would be great to be able to specify .ts files too, which then get transpiled into target ES version.
This would e.g. allow us to include separate files which reads from environments.ts vars correctly.
My specific scenario:
I'm implementing Firebase Messaging, which require
firebase-messaging-sw.js
in the root and contains config vars formessagingSenderId
(which I have stored in environment.ts).Describe the solution you'd like
When specifying an input with .ts extension, the builder transpiles it into .js.
Describe alternatives you've considered
This solution suggests to transpile the .ts file before the Angular build (
tsc my-file.ts && ng build
).But then we won't access the correct environment.ts, as it gets determent in the Angular build...
The text was updated successfully, but these errors were encountered: