Is there a way to automatically Uglify/Obfuscate f...
# suitecommerce
v
Is there a way to automatically Uglify/Obfuscate front-end extension code while deploying?
s
Write a gulp task
v
👍 Sounds good, I'll look into this. Thanks again, Steve 🙂
k
@Steve Goldberg, does NetSuite plan to add this to the standard gulp commands or do it how SCA gulp deploy works where extension javascript & CSS is automatically minified/uglified and you add a option to not have it be uglified? The web metrics tools, like PageSpeed Insights and others are reporting that the extension javascript and css files are not minified.
s
Ideally the minification should take place during extension activation, so that it is minified with all the other extension JS. Unfortunately we haven't been able to prioritise that work yet so we're in an awkward limbo where it's not being minified locally or remotely
k
Thanks for the response. We have several clients that are reporting low PageSpeed Insights scores and the compiled extension javascript and css files are always on the lists as an area of improvement.
s
I have fielded questions about PageSpeed Insights and our application before and while the suggestion of minified JavaScript is legitimate, that testing framework does not (as far as I am aware) fairly score single page applications
SPAs always have a heavy first hit, but the performance benefits come from each subsequent hit
This is why we recommended testing performance using a script on WebPagetest
k
I agree with your assessment of PageSpeed Insights. We have tuned SCA web stores in the past and usually it has minimal impact on PageSpeed Insights results. The report doesn’t provide enough information or details on how the score is determined, so that we can tune the areas that make a significant difference. We also use WebPageTest and GTMetrix. Often the areas of improvement are in the core part of SCA that we can’t change, Bronto’s files or 3rd party integrations, including Google’s various scripts.
k
So the question is, should we start to minify our css and js in the extensions....will this have much effect
s
One mystery perhaps best solved by one of the SuiteCommerce community's crack team of developer super heroes 😉
k
sounds like another thing for my rainy day list😂