#1122·PapaParse

Bug: `worker: true` returns malformed parse results in Vite v8 production builds

Author: milachaeCreated May 27, 2026Updated Sep 9, 2026

After upgrading a project from Vite v7 to v8, PapaParse parsing breaks in production builds when using worker: true.

The same code works correctly:

  • in development mode
  • in Vite v7
  • when worker: false

Expected behavior

Parsing a CSV with:

javascript
Papa.parse(csv, {
  header: true,
  worker: true,
})

should return parsed rows in data.

Example:

json
{
  "data": [
    {
      "property": "reportName",
      "value": "Example",
      "type": "string"
    }
  ]
}

Actual behavior

The parsed result is malformed:

  • data contains only null values
  • the actual row contents appear inside meta.fields

Example output:

json
{
  "data": [null, null, null],
  "errors": [],
  "meta": {
    "fields": [
      "property",
      "value",
      "type",
      ["reportName", "Example", "string"]
    ]
  }
}

This later causes runtime crashes because the application expects parsed row objects.

Notes

What I know so far:

  • Regression appeared after upgrading Vite v7 → v8
  • Only happens in production builds
  • Does not happen in development mode
  • Only happens when worker: true
  • Setting worker: false fixes the issue

Reproduction repository

I created a minimal reproduction repository here.

Steps to reproduce

bash
npm install
npm run build
python3 -m http.server 3000

Then open:

txt
http://localhost:3000