[VUE-CLI 3] Inject script on index.html

Hi is there a way to inject a script only when in production mode?
Something like this:

<%= NODE_ENV === 'production' ? '<script src="<%= BASE_URL %>js/SCOFunctions.js"></script>' : '' %>

I found out that the problem is the <%= BASE_URL %>, the conditional is working… is there a way to use the<%= BASE_URL %> inside de conditional?