Fixes JS minification #342
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes minified JavaScript (JS) by preventing token strings (e.g.
%MY_TOKEN%
) from being evaluated totrue
right away during JS minifcation.Closes #341.
To customize the JS code during runtime we string-replace config tokens of the form
'%MY_TOKEN%'
when serving them to the client via theJavaScriptServlet
class. Now during the newly introduced JS-minification these tokens were interpreted astrue
which broke this configuration injection. We now declare them as constants which prevents the evaluation.So we found in our project that the minified JS does not behave as the conventional JS as described in #341.
This is an attempt to restore this replacement token functionality in the minified JS.
What do you think?
Reproduction
To perform the JS minification use this command from the project root: