-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Package(s)
- router
Describe the bug
I have tried to use your lib in my project, but it causes the build to fail. I am using Webpack5 with typescript, and during the build, the ts-loader plugin from Webpack fails because of invalid type casts in the route.ts file from your lib.
The error is following:
ERROR in D:\Developing\PolytechWebThings\src\Web\ClientApp\node_modules\@profiscience\knockout-contrib-router\src\route.ts
161:4-55
[tsl] ERROR in D:\Developing\PolytechWebThings\src\Web\ClientApp\node_modules\@profiscience\knockout-contrib-router\src\route.ts(161,5)
TS2322: Type 'RouteConfig' is not assignable to type 'NativeRouteConfig[]'.
Type 'string' is not assignable to type 'NativeRouteConfig[]'.
ts-loader-default_e3b0c44298fc1c14
To Reproduce
Url to my project - > https://github.com/ArtemK123/PolytechWebThings
- Clone my repo
- Go to "/src/Web/ClientApp"
- Install the latest version of the router lib (2.1.5 at the moment of writing):
npm install @profiscience/knockout-contrib-router
- Try to add an import in some .ts file. I have used index.ts for this. Add the following import there
import { Route, Router } from '@profiscience/knockout-contrib-router';
- Run webpack build via
npm run build
Expected behavior
Webpack build is finished successfully
Desktop (please complete the following information):
- Windows 20H2
- node v12.17.0
- The build was executed from the cmd
Metadata
Metadata
Assignees
Labels
No labels