UNPKG

next

Version:

The React Framework

12 lines (11 loc) 545 B
const basePath = process.env.__NEXT_ROUTER_BASEPATH || ''; const pathname = "" + basePath + "/__nextjs_source-map"; export const findSourceMapURL = process.env.NODE_ENV === 'development' ? function findSourceMapURL(filename) { if (filename === '') { return null; } const url = new URL(pathname, document.location.origin); url.searchParams.set('filename', filename.replace(new RegExp("^" + document.location.origin + basePath), '')); return url.href; } : undefined; //# sourceMappingURL=app-find-source-map-url.js.map