Mohamed-Kaizen / unplugin-svelte-components

On-demand components auto importing for Svelte
MIT License
37 stars 7 forks source link

fix: lost first character when inject code #20

Closed krist7599555 closed 1 year ago

krist7599555 commented 1 year ago

when using like

<script lang='ts'>import Header from './Header.svelte';
</script>

current transform is also remove i from import ... because assume whitespace after <script> tag and s.override(index, index + 1) cause code to be remove

try here stackblitz