A global `node-linker=hoisted` flattens node_modules and gives svelte, @sveltejs/kit and @sveltejs/acorn-typescript separate `acorn` copies. Since svelte parses TypeScript via `Parser.extend(tsPlugin())`, the mismatched Parser class hierarchy makes every `<script lang="ts">` block fail with "Unexpected token" during `vite build`. Pinning pnpm's default isolated linker in the repo `.npmrc` overrides any global setting so all three packages resolve a single `acorn` instance.
8 lines
361 B
Plaintext
8 lines
361 B
Plaintext
reporter=append-only
|
|
|
|
# Pin pnpm's default isolated linker. A global `node-linker=hoisted` flattens the
|
|
# tree and gives svelte, @sveltejs/kit and @sveltejs/acorn-typescript separate
|
|
# `acorn` copies, which breaks `Parser.extend(tsPlugin())` — every `<script lang="ts">`
|
|
# then fails to parse with "Unexpected token" during `vite build`.
|
|
node-linker=isolated
|