Closed micalevisk closed 2 years ago
@meszaros-lajos-gyorgy I notice that we don't have source maps, which can make things hard to debug. Is it on purpose (to make the bundle size smaller I guess)?
npm pack
here with source maps outputs unpacked size: 34.6 kB
without them: unpacked size: 15.8 kB
the new gitignore seems to be a bit too general for me, but at least once that's in the codebase it never-ever has to be touched again, so I can live with it. :)
About sourcemaps, esbuild was just recently introduced to the repo and I'm just learning on how it can be managed, but yes, we can add another config option to the command to produce sourcemaps too, it's just a matter of adding --sourcemap
to the command. Could you add that to this PR too, please?
@meszaros-lajos-gyorgy done! I like the ideia of keeping the package size small. I'm not sure if could gain something by using esbuild
as the size of sourcemap+bundle is bigger then having only the source code
I know that with esbuild we could publish both ESM and CJS
also, I don't think we need to track on git the generated file (index.js
on root) on the repo. What do you think?
you just need to build & publish locally instead
Good point, the generated index.js can be removed from git as it will always change whenever the sources change! Please open a ticket for the topic of CI/CD and we can continue the discussion there.
We already have a ticket on that, if forgot... :D
closes #13