L
L
Lev Yakovlev2019-06-27 13:31:02
JavaScript
Lev Yakovlev, 2019-06-27 13:31:02

When building a project in gulp, unnecessary html tags remain. How can I remove them at build time?

When building, I merge all css files into one minified main.css , I do the same with js files. Because of this, it happens that the link and script tags with the paths that I wrote in the html file before the assembly are no longer needed. The console displays an error that the link files do not exist. How can I remove these tags so that they do not remain after assembly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Arthur K., 2019-06-27
@amark

It looks like it's worth "rebuilding" the HTML as well.
Or, if there is a render engine, it is worth teaching it to understand where is dev and where is production. In this case, the difference in links can be tied to such an "understanding"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question