unjs / unplugin

Unified plugin system for Vite, Rollup, Webpack, esbuild, Rolldown, and more

Home Page:https://unplugin.unjs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting SyntaxError: Unexpected token, I think it's due to the optional chaining.

ukhanzada-nisum-com opened this issue · comments

Environment

"webpack": "^4.44.2",
"@sentry/webpack-plugin": "^2.2.2",
node: 12

Reproduction

When I am trying to build my app it gives me the error if I remove the below line it'll start working.
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

Describe the bug

const setup = (plugin) => plugin.esbuild?.setup ?? ((pluginBuild) => {
SyntaxError: Unexpected token.

Screen Shot 2023-06-15 at 5 28 09 PM

Additional context

No response

Logs

No response

We temporarily close this due to the lack of enough information.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required

You should upgrade your node. v12 is EOL

I use node14.19.0 .has same question