fix matching npm dependency

pull/3622/head
yann300 2 years ago
parent d40d83256f
commit 38541bd6a5
  1. 2
      libs/remix-url-resolver/src/resolve.ts

@ -147,7 +147,7 @@ export class RemixURLResolver {
let pkg
if (deps) {
Object.keys(deps).map((dep) => {
const reg = new RegExp(dep, 'g')
const reg = new RegExp(dep + '/', 'g')
const match = url.match(reg)
if (match && match.length > 0 && matchLength < match[0].length) {
matchLength = match[0].length

Loading…
Cancel
Save