turbo icon indicating copy to clipboard operation
turbo copied to clipboard

[Turbopack] Trailing commas in tsconfig.json - Failed to parse

Open PouletteMC opened this issue 2 years ago • 0 comments

What version of Turbopack are you using?

latest

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Windows

Describe the Bug

When running a NextJS project with pnpm dev --turbo, if tsconfig.json has trailing commas, the file faisl to parse

This behavior does not occur with pnpm dev

Expected Behavior

The bundler should ignore trailing commas

To Reproduce

add a trailing comma within your tsconfig.json

Example

{
  "compilerOptions": {
    "target": "ES6",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "paths": {
      "@Components": ["./components"],
      "@Utils" : ["./utils"]
    },
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "pages/_app.tsx", "utils/prismadb.js", "utils/elasticsearch.ts", "functions/src/index.ts", "components/search-ui/index.jsx", "components/search-ui/index.jsx"],
  "exclude": ["node_modules"],
}

Reproduction Repo

No response

PouletteMC avatar Oct 27 '22 13:10 PouletteMC