Closed AubreyF closed 1 year ago
I think it's the issue in tsconfig2.json. I created PR #378 trying to fix this issue.
Basically I think the generated commonjs code should not contain export
keyword at all, which is for ESM modules.
@ranmocy Thanks! I just confirmed that your fix resolves this issue in our production NextJS codebase ✔
Describe the bug
Summary We're encountering an unusual "Unexpected token 'export'" build error when attempting to import and use actions. This appears to be related to the way this package exposes exports. Many thanks to anyone who has seen this before and/or has suggestions to resolve.
Project details:
Repro:
tsconfig.json:
Sample code:
Build error we're seeing:
Your Example Website or App
https://stackblitz.com/edit/nextjs-flexlayout-build-error-unexpected-token-export
Steps to Reproduce the Bug or Issue
Expected behavior
Code should not error on build
Operating System
macOS
Browser Type?
Chrome
Browser Version
all
Screenshots or Videos
Additional context
No response