jaredpalmer/razzle

Add support for more than just a `.js` version `razzle.config.js` file

heath-freenome opened this issue ยท 1 comments

๐Ÿš€ Feature request

Current Behavior

I am using razzle with a full typescript application and I'd love to be able to have my razzle.config.js file also be in typescript

Desired Behavior

Rather than needing to write my razzle.config.js file in javascript, I'd love to use Typescript or, for the simple cases where one just wants to update options or use a plugin, a .json file

Suggested Solution

Have razzle look for any of razzle.config.js, razzle.config.ts or razzle.config.json when starting up

Who does this impact? Who is this for?

It impacts those of us who want a pure Typescript environment

Describe alternatives you've considered

I've tried using both a .ts and .json version, and in both cases, it seems like the options portion of the config aren't being respected even though it seems that the functional parts are, because my razzle.config.js has turned off the cache option, but when I switch the file to be razzle.config.ts, the cache directory begin generating again. Since we have implemented a custom plugin, that plugin seems to be executing in the places where the webpack config is updated. Or else, the original webpack 5 issues I had to deal with are no longer needing to be updated and my app really works (mostly) without my customizations.

Additional context

Ah... Yep it is the latter... I probably can remove my one-off customizations I originally added to get webpack 5 to work...