@cypress/vite-dev-server 6.0.1 → 6.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,10 +26,10 @@ const CypressSourcemap = (options, vite) => {
26
26
  */
27
27
  const sourcemap = this.getCombinedSourcemap();
28
28
  const sourcemapUrl = sourcemap.toUrl();
29
- if (/\/\/# sourceMappingURL=/i.test(code)) {
29
+ if (/\/\/# sourceMappingURL=(?!['"])/i.test(code)) {
30
30
  // If the code already has a sourceMappingURL, it is not an inlined sourcemap
31
31
  // and we should replace it with the new sourcemap
32
- code = code.replace(/\/\/# sourceMappingURL=(.*)$/m, `//# sourceMappingURL=${sourcemapUrl}`);
32
+ code = code.replace(/\/\/# sourceMappingURL=(?!['"])(.*)$/m, `//# sourceMappingURL=${sourcemapUrl}`);
33
33
  }
34
34
  else {
35
35
  // If the code does not have a sourceMappingURL, we should append the new sourcemap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/vite-dev-server",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "Launches Vite Dev Server for Component Testing",
5
5
  "main": "index.js",
6
6
  "scripts": {