mst-gql icon indicating copy to clipboard operation
mst-gql copied to clipboard

optimize final build

Open chrisdrackett opened this issue 5 years ago • 5 comments

this came up in #225. At the moment we don't compress our bundle. There might also be other low hanging fruit we're missing around our build process so this issue covers looking at it and improving it where possible.

chrisdrackett avatar May 07 '20 14:05 chrisdrackett

@mweststrate is there a reason we use --no-compress at the moment when building? I see it came in fairly early here: https://github.com/mobxjs/mst-gql/commit/56905674249676432330bb0e35ab082a58aad00d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 and I'm curious if there was something you had run into that necessitated that

chrisdrackett avatar May 07 '20 14:05 chrisdrackett

I think that was just too make debugging easier in the example project

On Thu, 7 May 2020, 15:51 Chris Drackett, [email protected] wrote:

@mweststrate https://github.com/mweststrate is there a reason we use --no-compress at the moment when building? I see it came in fairly early here: 5690567#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 https://github.com/mobxjs/mst-gql/commit/56905674249676432330bb0e35ab082a58aad00d#diff-b9cfc7f2cdf78a7f4b91a753d10865a2 and I'm curious if there was something you had run into that necessitated that

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mst-gql/issues/226#issuecomment-625303502, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBFJ4ADEKU6T4CMI72LRQLDI5ANCNFSM4M3MQ3VA .

mweststrate avatar May 07 '20 15:05 mweststrate

For the react-native field in package.json, we could also point to the source src/mst-gql.ts. My understanding is that metro supports compiling TypeScript and would make the debugging experience for the user better.

dpnolte avatar May 08 '20 06:05 dpnolte

I strongly recommend against doing that in general. It is very likely to break if the typescript version or configuration differs from the hosting project. The node eco system is not designed for having untranspiled modules

On Fri, May 8, 2020 at 7:26 AM dpnolte [email protected] wrote:

For the react-native field in package.json, we could also point to the source src/mst-gql.ts. My understanding is that metro supports compiling TypeScript and would make the debugging experience for the user better.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mst-gql/issues/226#issuecomment-625656846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN4NBA4ZIK6PENDXQWVBVDRQOQ2JANCNFSM4M3MQ3VA .

mweststrate avatar May 12 '20 14:05 mweststrate

right, didn't realize that :) If anyone is picking this up, please disregard my comment above.

dpnolte avatar May 13 '20 16:05 dpnolte