Comments (5)
This issue was fixed with the introduction of raw.esm.sh
. Here is the original example with the no bundling option enabled:
import('https://raw.esm.sh/@pyscript/core/dist/core.js').then(
() => document.body.appendChild(document.createElement('py-script'))
);// Add your code here
We can close this issue
from esm.sh.
FYI we've changed the default main export as index.js
, which simply import * from './dist/core.js'
but the issue remains and there's no escape hatch to avoid re-bundling our project in a way that makes sense (or that work at all).
from esm.sh.
the name "py-script" has already been used with this registry
seems the package registries the element automatically
from esm.sh.
@ije that's how custom elements work, the issue is that the error plugin includes again the whole package breaking in all possible ways:
- the reference to hooks is not the desired one
- anything in there is not the same as anything exported by the initial
core.js
- every other CDN works as expected, esm.sh is the only one breaking our module
Please read again Additional Info in the filed bug and compare what we expect as a file to what this CDN returns instead, thanks.
from esm.sh.
@ije Is there a plain esm mode without bundling. That would probably solve the issue. Bundling is not good for singletons, especially when there are multiple import()
calls and esm.sh has no idea what packages to share, so it if bundles them each time, that causes problems and it is not how ES Modules actually work. I had same issues with Skypack, but that's inactive now.
from esm.sh.
Related Issues (20)
- Support GitHub Gists
- Failed to import - d3 HOT 1
- Failed init cli on NPM HOT 7
- Support importing modules from jsr.io HOT 1
- how to get react profiling version
- Failed to import - basehub/react - shows 500 Internal Server Error. - on commit
- Failed to import - @mui/material HOT 6
- Failed to import - openlayers
- All previously built urls are failing HOT 1
- Question: why don't you use yarn pnp
- Self hosted - 405 Response using the npm.pkg.github.com registry HOT 3
- Wrong `x-typescript-types` for `@babel/parser`
- Failed to import - @headlessui/react HOT 3
- Failed to import - [email protected] (previous version works) HOT 3
- Problem with using Monaco with ESM HOT 2
- Failed to import - Cloudscape components
- Failed to set `react` as external dependency
- Failed to set `@use-gesture/core/action` as external dependency HOT 2
- Failed to import - jotai/utils
- Invalid hook call with @react-three/fiber HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esm.sh.