Problems with minification
vieraleonel opened this issue · comments
Hi, first of all, amazing package.
I've recently used it in a project and everything works like a charm while in development. But when in production (and minification forcefully activates) I get two errors:
- HTML comments (
<!-- -->
) translate to "<>". - Javascript line comments ( // ) don't get removed, so when minified all the following code gets commented.
The two errors are easyly avoidable by using blade comments but I think It would be great not having this problem.
Keep Up the great work!
Leonel
This looks like a problem with a minificator you use. It should strip all comments, that's its job
Perhaps I don't make myself clear. When APP_ENV=production , it activates your plugin's minifier like said in widgetize.php
/*
|--------------------------------------------------------------------------
| Minify Widget HTML
|--------------------------------------------------------------------------
| Minify widgets to save both 'cache storage space' and the 'page size'
|
| * Putting "APP_ENV=production" in .env will forcefully enable minification.
*/
'minify_html' => false,
And thats when HTML comments ( <!-- -->
) get broken and JS line comments (//
) don't get removed.
Is there a way to change the minifier?
Thanks
There is no widgetize.php
file in this package and no built-in minifier too.
It seems that you use another 3rd party package/platform that implements this functionality and you should contact them
Oh you are right. Sorry to bother. Thanks for taking your time to respond