Open
Description
TanStack Table version
v8.21.2
Framework/Library version
Next.js v15.2.4
Describe the bug and the steps to reproduce it
What version of TanStack Table are you using?
@tanstack/react-table: [v8.21.2]
What version of Next.js are you using?
Next.js: 15.2.4
What is your issue?
When building a Next.js 15 project with @tanstack/react-table
, the following error occurs:
Module parse failed: 'import' and 'export' may appear only with 'sourceType: module'
It seems that Next.js Webpack does not handle this package as an ESM module correctly.
Steps to Reproduce:
- Create a Next.js 15 project.
- Install
@tanstack/react-table
(npm install @tanstack/react-table
). - Use it in a component.
- Run
npm run build
.
Expected Behavior:
The build should succeed without errors.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
undefined
Screenshots or Videos (Optional)
Do you intend to try to help solve this bug with your own PR?
None
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Metadata
Metadata
Assignees
Labels
No labels