Hi,
Using Octopus 3.2.4-bugfix-loglines0056, I am trying to do some variable substitution into a javascript file created with webpack
You can see the variable definition in the attached screenshot and in my source javascript file I have:
`var test = “#{Wsf.Host}”;
which is transformed using webpack (before the nuget package is created) into
`var l="#{Wsf.Host}";
Though note that this is not on a line on it’s own - it is mixed in with a bunch of other javascript on the same line which has been minified by webpack, hence the variable name change.
The configuration of the “Substitute variables in files section” of the process specifies
`configuration.*.bundle.js
and the file name itself, which changes every time it is webpacked, is
`configuration.cdff324f4fba11c9aab9.bundle.js
I can see this line in the log file showing it has found the file:
Performing variable substitution on 'D:\Octopus\Applications\DEV\XXXX\configuration.cdff324f4fba11c9aab9.bundle.js'
but no substitution has been performed.
I am deploying to the DEV environment and the value is marked in Octo to go to DEV. I have also tried with values with no specific target and still no joy
Could it just be that Octo doesn’t like the webpacked code and the line requiring substitution needs to be on a line on it’s own in the file, or am I missing something else obvious?
thanks