-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Description
Wayfinder Version
0.1.12
Laravel Version
12.39.0
PHP Version
8.4.1
Description
After creating a new laravel project with the vue starter kit and formatting all files with vscode extensions, when i execute npm run build i keep getting this error and the build fails:
ERROR: Unexpected newline before "=>"
file: /home/gilney/projects/multitenancy3/resources/js/routes/index.ts:28:0
Unexpected newline before "=>"
26 | (options?: RouteQueryOptions
27 | )
28 | => {
| ^
29 | return login.definition.url + queryParams(options)
30 | }
This happens with all functions like this one generated by wayfinder inside routes/ and actions/.
Copilot, on vscode, suggested the following change inside the file vendor/laravel/wayfinder/src/TypeScript.php:
And this fixes the problem.
PS: I'm on Windows with the project inside the WSL2, dunno if that matters, but...
Steps To Reproduce
- Create a new laravel project;
- Open it with vscode (v1.106.1);
- Use the extension Format Files to fix all files in the workplace. I have the PHP by DEVSENSE to format php/blade files, Vue oficial for vue files and Prettier for the rest;
- Run
npm run build; - Watch the error happening;
Metadata
Metadata
Assignees
Labels
No labels