Skip to content

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