Skip to content

conditions in html  #12

@spustlik

Description

@spustlik

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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions