Skip to content

swcMinify: true - ReferenceError: Can't find variable: excludeEmptyString #30429

Closed
@JClackett

Description

@JClackett

What version of Next.js are you using?

12.0.1

What version of Node.js are you using?

16.10.0

What browser are you using?

Safari

What operating system are you using?

MacOS

How are you deploying your application?

Vercel

Describe the Bug

I'm sure its connected to other issues, but thought I'd provide some more context.

Setting the swcMinify config to true seems to break something in the runtime as it successfully builds and deploys, but then when navigating to certain pages I get:

ReferenceError: Can't find variable: excludeEmptyString 
  matches — string.js:75
  (anonymous function) — <some-page>.tsx:33
  g — bootstrap:22
  (anonymous function) — _N_E:6
  promiseReactionJob

Expected Behavior

Not error :)

To Reproduce

Our team has a boilerplate repo we use on all our projects:

https://github.com/NoQuarterTeam/boilerplate

  • cd into packages/web
  • change the next.config.js file to set swcMinify to true
  • yarn build
  • yarn start
  • Navigate to /login

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions