Answer the question
In order to leave comments, you need to log in
How to prevent minification of a separate part of html or javascript code?
Good afternoon!
Faced the following problem: It is
necessary to display the js code on the page and highlight it using the prismjs library.
The template of this code is stored in the html file, in the application itself I call it through require('./script.tpl.html')
.
The problem is that during production build, webpack minifies this html template, resulting in one long line.
Is it possible to protect a part of the code from minification? For example special comments in js or in html for UglifyJsPlugin?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question