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

Vite/ESM support #5

Closed
okydk opened this issue Feb 4, 2021 · 2 comments
Closed

Vite/ESM support #5

okydk opened this issue Feb 4, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@okydk
Copy link

okydk commented Feb 4, 2021

Looks very promising!
However I'm getting errors while trying the vue 3 version with Vite?

11:13:52 AM [vite] Internal server error: Failed to resolve import ".entry.js". Does the file exist?
  Plugin: vite:import-analysis
  File: /node_modules/.vite/@revolist_vue3-datagrid.js?v=dca1123c
  1687|    return import("./" + a + ".entry.js").then(function(e2) {
     |                  ^
@revolist
Copy link
Owner

revolist commented Feb 5, 2021

Hello @okydk, I have investigated your problem, and seems it's an issue from Vite.
They don't support relative imports well hence it fails for external libraries. They have tried to fix it here but fix didn't cover all.
vitejs/vite@bbfe06c

@revolist
Copy link
Owner

Hello @okydk, sorry for a long answer.
Starting from version 3.0 everything should work just fine. I have updated your sample with a working example:

https://github.com/revolist/vue3-revolist-sample
We have switched to esm modules and direct import.

But 3.0 still in beta, we are improving some things such as compatibility with modern frameworks, build systems such as vite and bootstrap support.

"@revolist/vue3-datagrid": "^3.0.0-beta.1"

@revolist revolist pinned this issue Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants