minify-js not working?
See original GitHub issueProbably user error, but “–minify-js true” isn’t working even though I have uglifyjs installed (npm install uglify-js -g). I’m sure this was working about 4 months ago when I last minified.
html-minifier \
--collapse-whitespace --remove-comments --remove-optional-tags \
--remove-redundant-attributes --remove-script-type-attributes \
--remove-tag-whitespace --use-short-doctype --minify-css true \
--minify-js true chooser.html-source > chooser.html
Output seems to still have <script> block un-minified:
</div></div></div><script>// test with:
console.log("Starting")
window.fbAsyncInit = function() {
// console.log('FB init')
FB.init({
appId : 'XXXX',
autoLogAppEvents : true,
xfbml : true,
version : 'v3.1'
});
// console.log('FB check')
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6
Top Results From Across the Web
Minified JS causes JS to not work - Stack Overflow
Well, I have about 10 files that work fine, then when minified, they don't... I'm not sure exactly what doesn't work, there are...
Read more >After minifying my JS is not working ! - Laracasts
Hi, When i run my laravel elixir gulp --production it minifying my js files with webpack but why it's not working after that...
Read more >Minify JS not working - Netlify Support Forums
Minify JS under Deploy Settings, Asset optimization: isn't working for me. I have a plain HTML project, no build tools. CSS is being...
Read more >Why isn't Auto Minify working? – Cloudflare Help Center
Once enabled, Cloudflare's Auto Minify will minify your HTML and your cached CSS and JS files. If you view the source of your...
Read more >Minification not working for JS/CSS - Adobe Experience ...
Once you set the minify option in HTML Manager Configuration. Try restarting the bundle Adobe Granite UI Clientlibs com.adobe.granite.ui.clientlibs by stop/ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have the same issue. Running:
I’m still having this issue. I’m running it on a PHP-HTML-JS file with
ignoreCustomFragments: [ /(<[%\?])([\s\S]*?)(([%|\?]>)|$(?![\r\n]))/ ]
.