blitz-js / blitz-js/legacy-framework
[Installer]: Babel transpilation for JS projects should be smarter about file types
- Dominant language
- JavaScript
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
### What do you want and why?
- only `.tsx`-named files should be transpiled in TSX-Mode
- `.js`-named files shouldn't be transpiled at all
Both aren't really important right now, since all of our own templates are valid TSX.
It will become important once there are user-defined templates, though.
### Possible implementation(s)
Sharpen Babel transpilation logic in `generator.ts`.
### Additional context
As discussed in 25.05'ths codebase walkthrough.
@aem

Contributor guide
Research direction
Start in generator.ts and inspect the Babel transpilation logic and how it identifies template file types. Verify that only .tsx files use TSX mode and that .js files are not transpiled; the issue does not mention a test file, so check the existing installer or generator tests for coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, javascript
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100