advanced-astro/min

Removes scripts setting up custom elements

Opened this issue · 0 comments

When minifying this component

---
---
<astro-test> </astro-test>
<script>
    class AstroTest extends HTMLElement {
        constructor() {
            super();
            alert("This should fire");
        }
    }
    customElements.define("astro-test", AstroTest)
</script>

This minifier removes the entire script from the final output. This example works fine in dev builds.