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

SWC breaks full calendar #44983

Open
1 task done
christianjuth opened this issue Jan 17, 2023 · 0 comments
Open
1 task done

SWC breaks full calendar #44983

christianjuth opened this issue Jan 17, 2023 · 0 comments
Labels
template: bug A user has filled out the bug report template. Issue needs triaging

Comments

@christianjuth
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103
Binaries:
Node: 19.4.0
npm: 9.2.0
Yarn: 3.3.1
pnpm: N/A
Relevant packages:
next: 13.1.3-canary.2
eslint-config-next: 13.1.2
react: 18.2.0
react-dom: 18.2.0

Which area(s) of Next.js are affected? (leave empty if unsure)

SWC minifier (swcMinify: true)

Link to the code that reproduces this issue

https://github.com/breakthelovenewyork/next-full-calendar-test

To Reproduce

Build the repository and visit the top level index route.

Alternatively you can try this deployment I already made and look at the console.

https://full-calendar-test-christianjuth-breakthelovenewyork.vercel.app//

Describe the Bug

Next app builds and page loads initially. However, as soon as I try to interact with full calendar I get this weird null pointer error in the console. It seems – without really knowing how minifiers work – that SWC is removing an object it shouldn't be, causing the app to crash when full calendar tries to access properties on that object.

Uncaught TypeError: Cannot read properties of undefined (reading 'allDay')
    at ns (e501331d-4147ea66e121ec61.js:1:53236)
    at ru.render (e501331d-4147ea66e121ec61.js:1:89153)
    at T (407-ab674bd8c72b08ef.js:1:13663)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at T (407-ab674bd8c72b08ef.js:1:14047)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at 407-ab674bd8c72b08ef.js:1:15199
    at T (407-ab674bd8c72b08ef.js:1:15569)
    at w (407-ab674bd8c72b08ef.js:1:9982)
    at T (407-ab674bd8c72b08ef.js:1:14047)

If I set the following option it starts working.

// next.config.js
const nextConfig = {
  swcMinify: false
}

Expected Behavior

My app should word the same whether SWC is enabled or not.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

Vercel

@christianjuth christianjuth added the template: bug A user has filled out the bug report template. Issue needs triaging label Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template: bug A user has filled out the bug report template. Issue needs triaging
Projects
None yet
Development

No branches or pull requests

1 participant