vectara / create-ui

Generate a working React codebase for a range of generative and semantic search UIs
https://vectara.github.io/create-ui
Apache License 2.0
69 stars 12 forks source link

Pin react-focus-lock subdependency to 2.11.3 to fix webpack import error. #34

Closed cjcenizal closed 7 months ago

cjcenizal commented 7 months ago

Fixes https://github.com/vectara/create-ui/issues/33

I was able to reproduce by running the dev scripts locally. For now I solved the problem by pinning the react-focus-lock dependency incurred by react-focus-on. The root cause seems based on how CRA has configured webpack. A long-term solution will likely involve ejecting from CRA and implementing a solution like this: https://stackoverflow.com/questions/70964723/webpack-5-in-ceate-react-app-cant-resolve-not-fully-specified-routes

This change also commits the package-lock.json file for each app template, which I believe would have prevented this bug from surfacing.