V
V
Vitaly Rybchenko2018-04-13 10:21:34
css
Vitaly Rybchenko, 2018-04-13 10:21:34

How to correctly set links to js and css resources?

Hello!
Please advise or share a link to read.
How to properly use css and js files with code during development and release?
Those. during development in the studio I want to use structured and complete js/css files, but when publishing I want to minify them and use min files accordingly.
There is already an extension for minimization, but I don’t understand how to register links to these resources on the pages?
Those. On the page

<script type="text/javascript" src="../../Style/js/Pages/script.js?ver=4"></script>

how to make it automatically change to min?
<script type="text/javascript" src="../../Style/js/Pages/script.min.js?ver=4"></script>

Changing manually is not an option, because. There are a lot of pages that use different scripts.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Sklyarov, 2018-04-13
@0example

GULP
UPD: to implement what you are asking for, you need to add gulp-uglify

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question