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
Hello, I am using your script "voku/html-min": "^3.0" for some time and it is working great.
Recently we integrated vue.js into our laravel project and an unexpected bug appeared.
After some investigation I realised that the minifier removes the vue js attributes that start with @.
Let me show you an example. This code: <select v-model="filter" @change="getGraphData" :class="['c-chart__label']" name="filter">
If you minify it through:
$htmlMin = new HtmlMin();
$htmlMin->doOptimizeViaHtmlDomParser(true);
$htmlMin->doRemoveWhitespaceAroundTags(true);
$htmlMin->doRemoveSpacesBetweenTags(true);
return $htmlMin->minify($content);
You get this in the frontend: <select v-model="filter" :class="['c-chart__label']" name="filter">
That means that HtmlMin it strips out attributes that start with @.
It shouldn't be a hard fix for you @voku.
Thanks.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. Fixed in version 3.0.3.
The problem is the PHP-Dom-Parser (DOMDocument), it can't handle the "@" in front of an attribute, so here is the hack for that... ;) voku/simple_html_dom@2e18d6b
Hello, I am using your script
"voku/html-min": "^3.0"
for some time and it is working great.Recently we integrated vue.js into our laravel project and an unexpected bug appeared.
After some investigation I realised that the minifier removes the vue js attributes that start with
@
.Let me show you an example. This code:
<select v-model="filter" @change="getGraphData" :class="['c-chart__label']" name="filter">
If you minify it through:
You get this in the frontend:
<select v-model="filter" :class="['c-chart__label']" name="filter">
That means that HtmlMin it strips out attributes that start with @.
It shouldn't be a hard fix for you @voku.
Thanks.
The text was updated successfully, but these errors were encountered: