While working on a Node server locally, my SVG filter functions properly. However, once I build the project and run it on a server, the filter stops working.
This VueJS project is utilizing Webpack as its build tool.
The process of building the app involves running the command:
npm run build
In my CSS file, I have defined the filter like this:
filter: url(#white-glow);
After building the application, the CSS ends up in a subfolder (/static/css) which leads me to believe that the filter can no longer be located. Even though when inspecting the HTML source, the SVG filter is present.
Applying the filter as an inline style attribute in the HTML makes it work successfully.
<button style="filter:url(#white-glow);" data-v-32012fc8="">Music</button>
Edit: I am unable to use the above method because I only want the filter to be active in the :active state, which cannot be done with an inline style attribute.
Is there a way to ensure the filter remains accessible in the external CSS file after the app has been built?