You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tinyify would consider all of this unused code and remove this. To check if this is what happening, try adding a --standalone/-s flag to the browserify command, because then the export would not be considered unused.
Thank you @goto-bus-stop. That did the trick. Except it then defines the resulting lib as a UMD. I'd like a way to stop Tinyify from removing dead code. But apparently there's no flag for this in this plugin.
Activity
goto-bus-stop commentedon Jan 28, 2020
How does
src/main.jslook like?Sometimes modules don't have side effects. Like if they're just doing:
tinyify would consider all of this unused code and remove this. To check if this is what happening, try adding a
--standalone/-sflag to the browserify command, because then the export would not be considered unused.mig82 commentedon Jan 29, 2020
Thank you @goto-bus-stop. That did the trick. Except it then defines the resulting lib as a UMD. I'd like a way to stop Tinyify from removing dead code. But apparently there's no flag for this in this plugin.
goto-bus-stop commentedon Feb 24, 2020
If you do
window.MyApp = initAppin your main file it should also work.