goldensun_html5 icon indicating copy to clipboard operation
goldensun_html5 copied to clipboard

Write `webpack.config.js` in TypeScript

Open MilesBHuff opened this issue 3 years ago • 7 comments

Believe it or not: this is possible! You can call tsc directly in a package.json script, and then execute the result to start your Webpack build. A handy way to get all the features of TypeScript across your whole build pipeline!

MilesBHuff avatar Apr 11 '22 22:04 MilesBHuff

I suppose this issue becomes moot the instant #306 is merged.

MilesBHuff avatar Apr 11 '22 22:04 MilesBHuff

Well, for now, I don't have plans to merge #306. But I'm open make these changes or even update Webpack to a newer version. But I confess it's low priority (at least for me) right now.

jjppof avatar Apr 11 '22 22:04 jjppof

If/when I do this, it should probably coincide with an update to Webpack in general -- we're currently 2 versions behind latest.

MilesBHuff avatar Apr 17 '22 18:04 MilesBHuff

Sure! That would be awesome. The current bundling is very slow...

jjppof avatar Apr 17 '22 18:04 jjppof

It'll result in a kind of interesting situation: there will be 3 tsconfig.json files, and some other things you might not expect.

MilesBHuff avatar Apr 17 '22 18:04 MilesBHuff

One thing that you also may want to take into consideration is the fact that we'll be deploying it in Electron.

jjppof avatar Apr 17 '22 18:04 jjppof

That shouldn't matter, as long as the dist directory looks the same after a build. But it's a good reminder; thanks.

MilesBHuff avatar Apr 19 '22 18:04 MilesBHuff