mockaton 12.3.5 → 12.3.6

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mockaton",
3
3
  "description": "HTTP Mock Server",
4
4
  "type": "module",
5
- "version": "12.3.5",
5
+ "version": "12.3.6",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": "./index.js",
@@ -1,11 +1,14 @@
1
1
  // We register this hook at runtime so it doesn’t interfere with non-dynamic imports.
2
2
  export async function resolve(specifier, context, nextResolve) {
3
3
  const result = await nextResolve(specifier, context)
4
- const url = new URL(result.url)
5
- url.searchParams.set('t', performance.now())
6
- return {
7
- ...result,
8
- url: url.href,
9
- shortCircuit: true
4
+ if (result.url?.startsWith('file:')) {
5
+ const url = new URL(result.url)
6
+ url.searchParams.set('t', performance.now())
7
+ return {
8
+ ...result,
9
+ url: url.href,
10
+ shortCircuit: true
11
+ }
10
12
  }
13
+ return result
11
14
  }