-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
How to use your library as esm module? #63
Comments
Hi @viT-1,
This is the full bundle: |
I'm trying to declare path for esm loading (tsconfig paths) as But even I "hack" my transpiled ts to js files with
|
My project for example using vue with SystemJS for production & esm for dev testing. I am using vue esm version there. |
I'm sorry but I have a hard time understanding the issue. <!DOCTYPE html>
<html>
<body>
<img id="sprite"></img>
<script type="module">
import wretch from 'https://unpkg.com/wretch@1.5.5/dist/index.js'
const imageTag = document.getElementById("sprite")
wretch('https://pokeapi.co/api/v2/pokemon/pikachu/')
.get()
.json(pikachu => {
imageTag.src = pikachu.sprites.front_default
})
</script>
</body>
</html> |
But if I use wretch as |
Ah I see, I'll add an esm bundle later today 👍. |
Version 1.6.0 has just been released with the esm bundle: https://unpkg.com/wretch@1.6.0/dist/bundle/wretch.esm.js |
When it will be on jsdelivr? |
I'm sleeping! bundle =))) |
I'm trying to use through ttsc & typescript-transform-paths
with paths in tsconfig.json
but if I resolve wretch, any other related from index.umd.js are not resolved,
cause of typescript-transform-paths resolved imports only in local app code, not node_modules =(
Do you plan to publish esm version?
The text was updated successfully, but these errors were encountered: