You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with the filenames containing an appended query string (eg. src/views/UsersIndex.vue?vue&type=template&lang.js) in the instrumentation. This causes our CI to fail when it tries to upload our coverage.
After looking around I changed transform method to the following to get rid of the query string.
if(exclude.shouldInstrument(id)){// Remove querys strings from file names.constfilename=id.replace(/\?.+$/,'')constsourceMap=sanitizeSourceMap(this.getCombinedSourcemap());constcode=instrumenter.instrumentSync(srcCode,filename,sourceMap);constmap=instrumenter.lastSourceMap();// Required to cast to correct mapping valuereturn{ code, map }asTransformResult;}
The text was updated successfully, but these errors were encountered:
There appears to be an official way to get the file name from the reference id. As Vite uses Rollups plugin system in the background, it shares some of it's API: this.getFilename. I will try this and see if it gets the desired results.
I have an issue with the filenames containing an appended query string (eg.
src/views/UsersIndex.vue?vue&type=template&lang.js
) in the instrumentation. This causes our CI to fail when it tries to upload our coverage.After looking around I changed transform method to the following to get rid of the query string.
The text was updated successfully, but these errors were encountered: