Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected token '}' #962

Closed
Kiyozz opened this issue Mar 12, 2021 · 2 comments
Closed

unexpected token '}' #962

Kiyozz opened this issue Mar 12, 2021 · 2 comments

Comments

@Kiyozz
Copy link

Kiyozz commented Mar 12, 2021

I’m using esbuild 0.9.1

My config

{
    entryPoints: files, // all my sources
    outdir: 'dist',
    platform: 'node',
    format: 'cjs',
    target: 'node10',
}

I’d like to mention, I'm not using bundle: true

Problem

Any export default statement failed at runtime with unexpected token '}' error.

Output from esbuild

0 && (module.exports = {
  default
})

It seems that default is treated as keyword default

Tested with node 10/12/14/15

I tested both minification or normal

Screenshot

CleanShot 2021-03-12 at 18 49 10@2x

@evanw
Copy link
Owner

evanw commented Mar 12, 2021

Really sorry about that. Will fix this soon. Closing as a duplicate of #960.

@evanw evanw closed this as completed Mar 12, 2021
@evanw
Copy link
Owner

evanw commented Mar 12, 2021

This has been fixed in version 0.9.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants