✘ [ERROR] [plugin fileSize] Unexpected token: punc (.)
/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:554:10:
554 │ throw new JS_Parse_Error(message, filename, line, col, pos);
╵ ^
at js_error (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:554:11)
at croak (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:1278:9)
at token_error (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:1286:9)
at unexpected (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:1292:9)
at statement (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:1418:17)
at _embed_tokens_wrapper (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:1343:26)
at parse_toplevel (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:3503:23)
at parse (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:3516:7)
at Object.minify (/opt/git/deusprox/openShare/research/node_modules/terser/dist/bundle.min.js:29472:42)
at handleFileSizeDisplay (/opt/git/deusprox/openShare/research/node_modules/esbuild-plugin-filesize/src/lib/esbuild-plugin-filesize.js:21:57)
This error came from the "onEnd" callback registered here:
/opt/git/deusprox/openShare/research/node_modules/esbuild-plugin-filesize/src/lib/esbuild-plugin-filesize.js:38:12:
38 │ onEnd(async () => {
╵ ~~~~~
at setup (/opt/git/deusprox/openShare/research/node_modules/esbuild-plugin-filesize/src/lib/esbuild-plugin-filesize.js:38:13)
at handlePlugins (/opt/git/deusprox/openShare/research/node_modules/esbuild/lib/main.js:852:23)
1 error
The issue terser/terser#1139 could be related since I am using optional chaining in this project, but @jridgewell mentioned this is supported since version v5.2.0 in that issue and this plugin already uses 5.7.0.
Hi, I wanted to add
esbuild-plugin-filesize
to my current project and got following error:The issue terser/terser#1139 could be related since I am using optional chaining in this project, but @jridgewell mentioned this is supported since version v5.2.0 in that issue and this plugin already uses 5.7.0.
Using: