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

All Typescript features that modify code are broken #13106

Closed
ottomated opened this issue Sep 2, 2024 · 3 comments
Closed

All Typescript features that modify code are broken #13106

ottomated opened this issue Sep 2, 2024 · 3 comments

Comments

@ottomated
Copy link
Contributor

Describe the bug

Typescript features such as constructor field initializers are broken in 5.0.0-next.240

class X {
  constructor(public foo) {}
}

// transpiles to
class X {
  constructor(foo) {}
}

// should transpile to
class X {
  constructor(foo) {
    this.foo = foo;
  }
}

Reproduction

REPL

Logs

No response

System Info

System:
    OS: Linux 6.10 Fedora Linux 40 (Forty)
    CPU: (32) x64 AMD Ryzen 9 5950X 16-Core Processor
    Memory: 50.96 GB / 62.70 GB
    Container: Yes
    Shell: 3.7.0 - /bin/fish
  Binaries:
    Node: 20.12.2 - ~/.volta/tools/image/node/20.12.2/bin/node
    Yarn: 4.3.1 - ~/.volta/tools/image/yarn/4.3.1/bin/yarn
    npm: 10.5.0 - ~/.volta/tools/image/node/20.12.2/bin/npm
    pnpm: 9.7.0 - ~/.volta/bin/pnpm
    bun: 1.1.20 - ~/.bun/bin/bun
  npmPackages:
    svelte: 5.0.0-next.240 => 5.0.0-next.240

Severity

blocking all usage of svelte

@dummdidumm
Copy link
Member

Closing as duplicate of #11502 - we need to error on cases that we cannot/won't transpile, and try to transpile others that are possibly more straightforward. Silent errors like this are bad, I agree

@dummdidumm dummdidumm closed this as not planned Won't fix, can't repro, duplicate, stale Sep 2, 2024
@ottomated
Copy link
Contributor Author

This was only recently broken so it seems like a regression, unless it was only unintentionally working before?

@dummdidumm
Copy link
Member

This is likely because vite-plugin-svelte changed its default from preprocessing script tags to not preprocessing them. You can reenable that and it will work again https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/preprocess.md

cc @dominikg - it looks like the docs aren't updated yet to show the changed default?

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