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

conditions in html #12

Open
spustlik opened this issue Jun 23, 2024 · 1 comment
Open

conditions in html #12

spustlik opened this issue Jun 23, 2024 · 1 comment

Comments

@spustlik
Copy link

I am trying to use this great plugin with vite. In typescript, it works well:

// #if DEV
console.log('DEV')
// #else
console.log('else DEV');
// #endif

but in html, with any combinations of whitespaces and # it doesn't work:

<!-- if DEV -->
    <div>DEV</div>
<!-- else -->
    <div>else DEV</div>
<!-- endif -->
<!-- #if DEV -->
    <div>#DEV</div>
<!-- #else -->
    <div>else #DEV</div>
<!-- #endif -->

It writes if and else branches.
It seems like plugin is not active, but it works on typescript.
I tried to write some code hacks to plugin, to log if my html file is proceeded.
I tried to use "include" option, but nothing works.
Please can you tell, what I am doing wrong?
Thank you...

@KeJunMao
Copy link
Owner

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

2 participants