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

How does it actually work ? #7

Open
MarcWeber opened this issue Sep 10, 2023 · 0 comments
Open

How does it actually work ? #7

MarcWeber opened this issue Sep 10, 2023 · 0 comments

Comments

@MarcWeber
Copy link

I love macros, too.
I hacked my own solution like this:

/* MACRO HERE blah */  /* MACRO END */

And writing a regex based preprocessor which fills in the code
So locations are correct, but I have all the verbose output in my files.
Some editors like Vim allow to collapse regions so ..

But would you mind explaining how your implementation works ?

If you want to use vite whatever .. who and when is responsible for doing the macro expansion ?
Environments ?
node, deno, esbuild, rollup, webpack, ....

But you made me think whether abusing providing own
implementation for 'import' would work, too.
But imports must be async or must be found at top of file.
So again no perfect solution.

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

No branches or pull requests

1 participant