blitz-js / blitz-js/legacy-framework

[Installer]: Babel transpilation for JS projects should be smarter about file types

Open
#42 0 comments 2 reactions 0 assignees View on GitHub
legacy-framework scope/server status/ready-to-work-on
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

![Sweet memes are made of geese](https://media.giphy.com/media/b8hm9N1bjne3S/giphy.gif)

Contributor guide

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.