I am developing an app using django as backend, and django templates for front end (Pages reload when navigating between urls).
For some advanced features, I had to use ajax communication between the template and the backend to avoid reloading for each action. So I ended up using vue js to react to server responses and also to build a pretty sophisticated UI.
Usually I use django compressor & uglifyjs to minify and mangle the variable names of my scripts build with jquery or vanilla js on each user request (middleware) using {% compress %}. This time with vue, when I mangle the data and function names, their references from the html in the v-if and v-bind: ...etc remains the same as before causing the UI to break because the v- instructions in the html doesn't use the new variable names after the mangling.
I want to know if there is a way to parse the html and rename the refrences with django compressor.
In case compressor doesn't provide such feature, is there some npm package or other tool/script that I can manually feed a file.html containing both HTML and my vue js code and it does the renaming and returns a new file that i can use in production ?
Thanks.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…