winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

`react-vite` template doesn't use `@dirname` #6578

Open eladb opened 1 month ago

eladb commented 1 month ago

I tried this:

Create a new react-vite project

This happened:

My code includes an extern for dirname instead of the shiny new @dirname.

I expected this:

No response

Is there a workaround?

No response

Anything else?

No response

Wing Version

No response

Node.js Version

No response

Platform(s)

No response

Community Notes

staycoolcall911 commented 1 month ago

Some additional details for any quick contributor out there:

To reproduce: run wing new react-vite

To fix, need to delete https://github.com/winglang/wing/blob/main/apps/wing/project-templates/wing/react-vite/backend/utils.js And update the usage of __dirname in https://github.com/winglang/wing/blob/main/apps/wing/project-templates/wing/react-vite/backend/main.w