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

require("unplugin-auto-import/webpack") is not a function #452

Closed
5 tasks done
whevether opened this issue Dec 2, 2023 · 1 comment · Fixed by #453
Closed
5 tasks done

require("unplugin-auto-import/webpack") is not a function #452

whevether opened this issue Dec 2, 2023 · 1 comment · Fixed by #453
Assignees

Comments

@whevether
Copy link

Describe the bug

0.17.1 require is not a function error
0.16.7 ok

Reproduction

0.17.1 webpack error

System Info

System:
    OS: macOS 14.1.2
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 20.84 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.2 - ~/.nvm/versions/node/v18.18.2/bin/node
    npm: 9.8.1 - ~/.nvm/versions/node/v18.18.2/bin/npm
    pnpm: 8.10.5 - ~/.nvm/versions/node/v18.18.2/bin/pnpm
    Watchman: 2023.02.06.00 - /usr/local/bin/watchman
  Browsers:
    Chrome: 119.0.6045.199
    Edge: 119.0.2151.97
    Safari: 17.1.2

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
@userquin userquin self-assigned this Dec 2, 2023
@userquin
Copy link
Member

userquin commented Dec 2, 2023

To fix the problem use require + default => require('unplugin-auto-import/webpack').default({ /* options */ })

I will add it to the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants