FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 261 forks source link

Add webpack plugin to automatically load the routes with no user interactions #429

Closed Tofandel closed 2 years ago

Tofandel commented 2 years ago

Changes:

tobias-93 commented 2 years ago

Awesome addition, thanks @Tofandel! Looking forward to trying this

Tofandel commented 2 years ago

@tobias-93 Thanks for merging, I had lost hope this would be merged 😅

I've been using this for 5months and so it's been properly tested, there is only one bug I forgot to fix in the PR

The line await makeDir(path.basename(this.finalTarget), {recursive: true})

Needs to be changed to await makeDir(path.dirname(this.finalTarget), {recursive: true}); otherwise it creates an empty dir fosRoute.json at the root of the project instead of creating the var/cache directory if it doesn't exists

It's a simple line fix, so if you want to change it yourself or I can make a follow up PR, as you prefer