diff --git a/packages/sirv/index.js b/packages/sirv/index.js index aac68b7..f3f4015 100644 --- a/packages/sirv/index.js +++ b/packages/sirv/index.js @@ -1,7 +1,7 @@ import * as fs from 'fs'; import { join, normalize, resolve } from 'path'; +import { parse } from '@polka/url'; import list from 'totalist/sync'; -import parser from '@polka/url'; import mime from 'mime/lite'; const noop = () => {}; @@ -160,7 +160,7 @@ export default function (dir, opts={}) { if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots); extns.push(...extensions); // [...br, ...gz, orig, ...exts] - let pathname = req.path || parser(req, true).pathname; + let pathname = req.path || parse(req, true).pathname; let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns); if (!data) return next ? next() : isNotFound(req, res); diff --git a/packages/sirv/package.json b/packages/sirv/package.json index 0307e97..c66f657 100644 --- a/packages/sirv/package.json +++ b/packages/sirv/package.json @@ -20,7 +20,7 @@ "node": ">= 10" }, "dependencies": { - "@polka/url": "^1.0.0-next.9", + "@polka/url": "^1.0.0-next.15", "mime": "^2.3.1", "totalist": "^1.0.0" }