const checkRoute = ({
routeItem,
path
}: {
routeItem?: any
path: string
}) => {
// 永远不会抛出错误
if (!routeItem) {
throw new Error(`
With Path: ${path} search component failed
If you create new folder or component file, please restart server by npm start
`)
}
}
详细描述你的问题
ssr-common-utils > findRoute
ssr-common-utils > checkRoute
plugin-react-18 > src > entry > server-entry.tsx
期望的结果
访问未定义的路由时,server端正常抛出
search component failed
错误当前使用的版本
├─ ssr-common-utils@6.2.107 ├─ ssr-core@6.2.29 ├─ ssr-deepclone@1.0.1 ├─ ssr-hoc-react18@6.2.11 ├─ ssr-mini-css-extract-plugin@1.6.3 ├─ ssr-plugin-nestjs@6.2.24 ├─ ssr-plugin-react18@6.2.67 │ └─ ssri@7.1.1 ├─ ssr-serialize-javascript@6.0.4 ├─ ssr-types@6.2.49 ├─ ssr-vite-plugin-style-import@2.0.1 ├─ ssr-webpack@6.2.15 ├─ ssr-webpack4@4.46.2 ├─ ssr@6.2.61 └─ ssri@6.0.2