Skip to content
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

Feature/typescript app template #96

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Feature/typescript app template #96

wants to merge 3 commits into from

Conversation

tgolbs
Copy link

@tgolbs tgolbs commented Aug 26, 2018

I wanted to use x0 inside of my own typescript projects, but it kinda felt dirty to create a custom _app.js file instead of using TypeScript all along.

The changes i did to make this work are really basic.

The only problem i could see is, that the user must add ts-loader via a custom webpack.config.js. This is kind of contrary to the zero config approach of x0 but i think this is ok for such a quick win.

What do you think of this approach?

Tobias Golbs added 3 commits August 26, 2018 21:23
- added tsx extension to file pattern
- changed filtering of existing files to match against new regex that
matches _app.js and _app.tsx
and is also easily extendable
- included custom webpack.config.js to add ts-loader
- added simple tsconfig
- added _app.tsx
To allow .ts and .tsx files webpack.config.js must be updated
with resolve.extensions parameter
This will ensure, that .ts and .tsx extensions must not be explicitly added in relative imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants