Closed ZaneHannanAU closed 5 years ago
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
:memo: Please visit https://cla.developers.google.com/ to sign.
Once you've signed (or fixed any issues), please reply here (e.g. I signed it!
) and we'll verify it.
ℹ️ Googlers: Go here for more info.
I signed it!
Currently is totally broken, hrmm...
May make my own terser thing and test...
Currently it seems that require
runs into a 404 after deploying; please offer help...
Your minifier settings mangled our AMD loader, specifically this line. It renames require
to Y
in this case. Any idea how to prevent that?
In that case, probably with reserved: [ "require" ]
. Tried it and it still isn't working though.
Still broken, but only slightly less so. I'll continue when I get back on my laptop soon.
For the time being, being very lighthanded on it and using only properties that are either constants (allcaps, snake case) or internal functions (__awaiter
) and state.
If we can whitelist more properties, that would be very nice; thank you.
I should probably have the name cache automatically output to lib/name-cache.json
rather than manually updating lib/name-cache.js
but for the time being it should be fine...
... famous last words.
... Should probably only keep certain properties (eg width, height, mines) in the name cache but uh... hrmm.
For the time being, I believe this is ready to check over again. It uses a regex of white-listed properties, so currently doesn't cause any notable errors...
okay wat
so now I'm seeing errors on the info screen?
Errors about undefined and so on
May be renaming of dot and stuff...
Gonna be honest, this seems like a lot of work to save 1kB.
Yeah, it is. It gets hard and whitelisting properties becomes difficult. Not to mention that I have no idea how the errors that came up have come up.
Relies on https://github.com/TrySound/rollup-plugin-terser/pull/33 at current due to single use stuff.Removed, inlined instead.mangle-props
(from uglifyjs/terser) could reasonably reduce the bundle size by a few KiB -- though that's not certain...description from uglify-js:
Similarly duplicated on options.mangle.properties: https://github.com/mishoo/UglifyJS2/blob/master/README.md#minify-options
Should (realistically) reduce size.