sveltejs / svelte-preprocess

A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
MIT License
1.73k stars 147 forks source link

Unexpected token in svelte + pug + Ts when three dots #545

Open wlwatkins opened 1 year ago

wlwatkins commented 1 year ago

Describe the bug

A clear and concise description of what the bug is.

SvelteFC({...chartConfigs}) leads to an Unexpected token (ts) error

To Reproduce

To help us help you, if you've found a bug please consider the following:

<template lang="pug">
  #chart-container
    SvelteFC({...chartConfigs})
</template>

Expected behavior

A clear and concise description of what you expected to happen.

This works fine

<div id="chart-container" >
  <SvelteFC {...chartConfig} />
</div>

I'm sure the answer is a special character that I am missing, but don't know what to look for on google.

kingcw commented 1 year ago

I have same problem even with quote "{...$$restProps}"