From 64b8eae7bb9c874297e1875dafb997bbebbab5f4 Mon Sep 17 00:00:00 2001 From: xiefengnian Date: Tue, 27 Jul 2021 16:32:26 +0800 Subject: [PATCH] feat: qiankun runtime support mfsu --- packages/plugin-qiankun/src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-qiankun/src/common.ts b/packages/plugin-qiankun/src/common.ts index 144138575..d509b20da 100644 --- a/packages/plugin-qiankun/src/common.ts +++ b/packages/plugin-qiankun/src/common.ts @@ -4,6 +4,7 @@ */ import { ReactComponentElement } from 'react'; +import pathToRegexp from 'path-to-regexp'; export const defaultMountContainerId = 'root-subapp'; @@ -27,7 +28,6 @@ function testPathWithStaticPrefix(pathPrefix: string, realPath: string) { function testPathWithDynamicRoute(dynamicRoute: string, realPath: string) { // FIXME 这个是旧的使用方式才会调到的 api,先临时这么苟一下消除报错,引导用户去迁移吧 - const pathToRegexp = require('path-to-regexp'); return pathToRegexp(dynamicRoute, { strict: true, end: false }).test( realPath, );