Next.js Discord

Discord Forum

Terser running even when swcMinify is set to true

Unanswered
Allegheny mound ant posted this in #help-forum
Open in Discord
Allegheny mound antOP
Hey! Hi all.
As far as I understood, according to Next.js documentation by using swcMinify, Next build would use SWC in the place of Terser. But I do have a Stencil library that I'm trying to integrate into my Next.js project but it breaks the build. I could pinpoint it to the Minification process. If I disable minification, it builds just fine

config.optimization.minimize = false

Would anyone have any idea of what could be going on?

This is the error during the build:
static/chunks/8155.1b8f280312edbbef.js from Terser
  x Expression expected
    ,-[72:1]
 72 |     :host {
 73 |       display: contents;
 74 |     }
 75 |   `;Zt([(0,_chunk_MVQ2HHKH_mjs__WEBPACK_IMPORTED_MODULE_3__.f)..........


This is my Next version:
"next": "~14.2.14"

Thank you all!

0 Replies