I have a Vue Js app (V2) which has a structure like so (shortened to focus on issue):
_variables.scss
$brand-theme:#F5F5F5
and loaded via sass loader as so in the vue.config.js
@import "@/assets/scss/_variables.scss";
As a result, in my various Vue components I can reference like so (this is being used in a few Vue files, not just App.Vue for example)
.button {
width: 100%;
text-align: center;
background: $brand-theme;
....
I have a requirement, where i need to inspect the URL, and change this value during runtime prior to rendering, by either manipulating the dom for example or another effective approach.
After some initial research, I am finding using this current structure problematic, and is leading me to re-think the approach, but I'm interested to find out if there's a way to do this with minimal code changes as is.
Thanks in advance.