You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added typescript support to one of my projects, I believe it should not be that hard to add it out of the box in the templates, so you can use .ts files or add the lang="ts" to the scripts in .vue files, while still supporting all old js files. This is what I did to add the support:
add ts-loader and typescript to package.json: npm i typescript ts-loader --save-dev
Optional: Add the @babel/plugin-transform-runtime plugin to the babel.config.js file to support async and await keywords in js, I believe this plugin was there before but not sure why it was removed. If this is not added, it would be better to change the target in the previous tsconfig.json file to es5 instead of esnext.
Also related to this syntax, the oldest version of chrome and webview to support this, is the 55, so maybe when you are ready to drop support for android < 5.0 then this should be the minimum accepted in the browserlist. For the web, I would say chrome 55 should already be the minimum. Firefox 52 and Samsung 6.2 are also reasonable minimums.
I did these for a vue project, but I think it should work for other templates too.
Reacted by Ricardo Cruz, Avihay, Daniel Marcus, gavr and Anders C.
Activity
peterlevel1 commentedon Apr 29, 2020
It would be nice if providing some demos on a git repo, others would give it a try and help the author to do some testing work.
D-Marc1 commentedon Apr 3, 2021
@nolimits4web Any chance TypeScript support be could be added to F7 cli? Seems like something that's really missing from it.
ThalesC commentedon Jul 25, 2022
Any chance TypeScript support will be added to F7? Or am I missing something?
Fdavidtr commentedon May 5, 2024
I was looking for the same =/