customAttrAssign issues on Polymer
See original GitHub issueI’ve tried the following
var optsHtml = {
caseSensitive: true,
customAttrAssign: [/\?=/],
customAttrSurround: [
[ /\{\{#if\s+\w+\}\}/, /\{\{\/if\}\}/ ],
[ /\{\{#unless\s+\w+\}\}/, /\{\{\/unless\}\}/ ]
],
collapseWhitespace: true,
preserveLineBreaks: true,
minifyCSS: true,
// minifyJS: true,
removeComments: true
};
However, the customAttrAssign
and customAttrSurround
seem to be causing issues.
I copied the values directly from the minifier.js test code. Any advice on what I may have done wrong?
This is the error that I’m getting:
events.js:141
throw er; // Unhandled 'error' event
^
Error: Parse Error: <div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]">
<div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
</div>
</div>
Issue Analytics
- State:
- Created 8 years ago
- Comments:8
Top Results From Across the Web
Developers - customAttrAssign issues on Polymer - - Bountysource
I've tried the following var optsHtml = { caseSensitive: true, customAttrAssign: [/\?=/], customAttrSurround: [ [ /\{\{#if\s+\w+\}\}/, /\{\{\/if\}\}/ ] ...
Read more >Polymer: vulcanizing/minifying site breaks it in Firefox
I have a custom build process for a Polymer site (Polybuild kept ... a function localhost:3000:1:2359 <snip repeated desugarBehaviors error>.
Read more >wc-loader - npm Package Health Analysis | Snyk
wc-loader helps you use webcomponents (polymer, x-tags etc also) with webpack. ... A total of 3 vulnerabilities or license issues were detected.
Read more >Build for production - Polymer Project
According to the native Custom Elements V1 spec, elements must be defined using ES6 classes. ES5-defined elements will error in the presence of...
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 added
/\$=/
to the customAttrAssign, but the resulting file from html-minifier ends up having the style$ value stripped.e.g.
<div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]">
becomes:<div id="drawer" style$="">
@alexlamsl As an aside: gulp-minify-inline allows a cssSelector. Specifying
style[is!="custom-style"]
allows it to ignore the Polymer-specific CSS and apply to the rest.