local-traffic 0.0.34 → 0.0.35

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.
Files changed (2) hide show
  1. package/index.ts +3 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -916,8 +916,9 @@ const start = () => {
916
916
 
917
917
  const { key, target: targetWithForcedPrefix } = determineMapping(request);
918
918
  const target = new URL(`${targetWithForcedPrefix.protocol}//${
919
- targetWithForcedPrefix.host}${request.url.replace(
920
- new RegExp(`^${key}`, 'g'), '').replace(/^\/*/, '/')}`);
919
+ targetWithForcedPrefix.host}${request.url.endsWith('/_next/webpack-hmr')
920
+ ? request.url
921
+ : request.url.replace( new RegExp(`^${key}`, 'g'), '').replace(/^\/*/, '/')}`);
921
922
  const downstreamRequestOptions: RequestOptions = {
922
923
  hostname: target.hostname,
923
924
  path: target.pathname,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "local-traffic",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "main": "index.ts",
5
5
  "private": false,
6
6
  "keywords": [