Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up minification #361

Open
icambron opened this issue Nov 4, 2018 · 3 comments
Open

Fix up minification #361

icambron opened this issue Nov 4, 2018 · 3 comments

Comments

@icambron
Copy link
Member

icambron commented Nov 4, 2018

Right now, we use a slightly brokeass minification system. Here's what happened:

  1. Originally, we had minification built into our Rollup pipeline. This is the best way to do the minification because it gets the map files right and because it can (at least in theory) be a bit smarter about the minification.
  2. But it broke and caused all sorts of horribleness, as you can see in Minified version on site is broken #357. I don't know what happened, but probably some part of the toolchain got upgraded and doesn't fit together right anymore
  3. I switched the build to just run uglify on the output of the relevant transpile steps
  4. You can switch between the old, better, broken method and the new, hacky, broken method by switching the TRUST_MINIFY const in build.js
  5. Presumably the fix is either finding the right version of the toolchain deps or fiddling with some config.
@ericmorand
Copy link

ericmorand commented Nov 5, 2018

Out of curiosity, why is it important to have a map file with a minified binary that is not supposed to be used as a dependency?

@icambron
Copy link
Member Author

icambron commented Nov 5, 2018

@ericmorand if you put the minifeid file directly on a web page and get an error, the mapping file should let you debug Luxon

@ericmorand
Copy link

Ok. I get our point. But I find it debatable to have a rather complex build toolchain just to provide some debugging tools for an environment that is not a dev environnement. Just my two cents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants