Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code extension showing environment of current file #1311

Open
brillout opened this issue Dec 4, 2023 · 0 comments
Open

VS Code extension showing environment of current file #1311

brillout opened this issue Dec 4, 2023 · 0 comments

Comments

@brillout
Copy link
Member

brillout commented Dec 4, 2023

Description

A neat thing of the file suffixes .server.js and .client.js is that they communicate in which environment the file is loaded.

But .server.js and .client.js are meant for asserting the environment; they aren't supposed to be used for every file.

It would be neat to have an IDE extension (e.g. for VS Code) that displays some kind of visual clue communicating to the user the environment of the current file.

We can start easy by showing the environment only for + files (Vike always knows the environment of + files). This alone would be very beneficial. AFAICT it should be relatively straightforward to implement.

Later, we can see if/how we can show the environment for each user file. It has to be seen whether we can quickly crawl the user's entire dependency tree (e.g. using esbuild + es-module-lexer) but, in principle, it should be possible as proven by TypeScript's IntelliSense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant