Preprocessing acts strange when used in combination with UglifyJsPlugin
Closed this issue · 1 comments
xaralis commented
When used together with UglifyJsPlugin
in production builds, this loader is very unreliable and unpredictable in HTML files.
Some things work (like echo, if), some things do not (like ifdef).
For example, this gets preprocessed OK:
<meta name="git-rev" content="<!-- @echo GIT_REV -->">
However, this fails:
<!-- @ifdef LAST_UPDATED -->
<d-updated-indicator when="<!-- @echo LAST_UPDATED -->"></d-updated-indicator>
<!-- @endif -->
Instead of producing nothing when LAST_UPDATED
is undefined
, it results in following code:
<d-updated-indicator when="undefined"></d-updated-indicator>
Can you please investigate and/or point me where to look for solution?
dearrrfish commented
Do you put preprocess before UglifyJS in build sequence?