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

dropzone.js can't be loaded if I use swc #43027

Closed
1 task done
0ldm0s opened this issue Nov 17, 2022 · 2 comments · Fixed by #42977
Closed
1 task done

dropzone.js can't be loaded if I use swc #43027

0ldm0s opened this issue Nov 17, 2022 · 2 comments · Fixed by #42977
Assignees

Comments

@0ldm0s
Copy link

0ldm0s commented Nov 17, 2022

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.0.1
  npm: 8.19.2
  Yarn: 1.22.19
  pnpm: 7.16.0
Relevant packages:
  next: 13.0.3
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Describe the Bug

I use dropzone.js for my nextjs project. I can use it in dev mode, but can't use it for ssg mode.

If I export for ssg, I get the error: extend is not defined.

Then I try to use dynamic import with ssr: false, nothing has changed, it's returns same error.

But, If I disable swcMinify, it can be used.

P.S. I disable it, but output file size is smaller. why?

Expected Behavior

dropzone.js can be use for ssg with swcMinify.

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://github.com/0ldm0s/dropzone-demo

To Reproduce

set swcMinify: true in next.config.js

@0ldm0s 0ldm0s added the bug Issue was opened via the bug report template. label Nov 17, 2022
@balazsorban44 balazsorban44 added kind: bug and removed bug Issue was opened via the bug report template. labels Nov 17, 2022
@balazsorban44
Copy link
Member

The output size difference was a regression, it has been fixed in #42790. But there is still an issue with the minifer regarding the good in the reproduction, so we will look into it. Thanks for reporting.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants