Fixes #39137 - TypeScript support for the fronend#10899
Fixes #39137 - TypeScript support for the fronend#10899Thorben-D wants to merge 1 commit intotheforeman:developfrom
Conversation
|
rpm build fails because the typescript packages are not packaged yet: Here is the accompanying packaging PR: |
lib/tasks/gettext.rake
Outdated
| require File.expand_path('../../lib/foreman/gettext/support.rb', __dir__) | ||
|
|
||
| FILE_GLOB = '{app,db/seeds.d,lib,config,locale,webpack}/**/*.{rb,erb,haml,slim,rhtml,js,rabl}' | ||
| FILE_GLOB = '{app,db/seeds.d,lib,config,locale,webpack}/**/*.{rb,erb,haml,slim,rhtml,js,tsx,rabl}' |
There was a problem hiding this comment.
Why for javascript we look at .js, but not .jsx and for typescript we look at .tsx but not .ts?
There was a problem hiding this comment.
TypeScript requires the .tsx extension for files that use JSX syntax, whereas for JavaScript it doesn't really matter.
I'll add .ts in case someone wants to use translation in a helper or something like that.
This commit adapts the Webpack config to allow compilation of .ts/.tsx files by Webpack. - Added packages: - typescript: 5.8.2 - ts-loader: 9.5.2 - Use ts-loader to load .ts/.tsx files during webpack compilation - Use plugin specific tsconfig.json file during compilation - Override module resolution of tsconfig.json from webpack config
2aa92e4 to
f5f2b41
Compare
This commit adapts the Webpack config to allow compilation of .ts/.tsx files by Webpack.
This is the accompanying Pull-Request to the RFC in the community forum.