superfly / fly

Deploy app servers close to your users. Package your app as a Docker image, and launch it in 17 cities with one simple CLI.
https://fly.io
985 stars 47 forks source link

Modularize app build logic #189

Closed Siilwyn closed 6 years ago

Siilwyn commented 6 years ago

In the vein of https://github.com/superfly/fly/issues/141 I'm proposing to publish core/src/utils/build.ts as a module @fly/build. The logic to 'get' the webpack config and compile the assets is something I have mostly duplicated 1:1 in my app. Since it's quite specific and build.ts doesn't seem to have many internal dependencies it seems like a good fit and starting point.

Thoughts on this?

Two internal imports are:

How to handle these, any ideas? They both are only a few lines of code, since v8envModulePath is only used in test and actually appended with a path the most pragmatic solution would be to inline it in my opinion.

mrkurt commented 6 years ago

This sounds like a great idea to me, I'm all for it. I think it will be pretty straightforward with our lerna setup too. If you feel like tackling it I'd be happy to merge + ship a new version.