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

Adding support for Vite #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ryanrapini
Copy link

Hey there! I don't think this package is in active development anymore. A project I have relies on this package and I wanted to continue to use it. Unfortunately when I upgraded to vite as the buildsystem, I would see the following error when trying to import this package:

[vite] Internal server error: Failed to resolve entry for package "vue-nestable". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: resources/js/offers.js
      at packageEntryFailure (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46575:15)
      at resolvePackageEntry (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46572:3)
      at tryNodeResolve (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46388:16)
      at ResolveIdContext.resolveId (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:46138:19)
      at async PluginContainer.resolveId (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:48952:22)
      at async TransformPluginContext.resolve (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:49113:15)
      at async normalizeUrl (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:63977:26)
      at async file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:64116:39
      at async Promise.all (index 9)
      at async TransformPluginContext.transform (file://node_modules/vite/dist/node/chunks/dep-CDnG8rE7.js:64043:7)

I went ahead and forked the repo and I'm consuming my "fixed" version in my project, so if you don't have time to test and merge these changes I understand.

** WARNING ** I don't know if my changes will break anything for anyone not using vite. I only tested this on vite. I'm not experienced with npm packaging so I may have done something horribly, horribly wrong. But it works great for me and I wanted to share in case this helps others.

Thanks for the package!

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 this pull request may close these issues.

1 participant