Giter VIP home page Giter VIP logo

Comments (5)

GianlucaGuarini avatar GianlucaGuarini commented on May 27, 2024 1

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.

WebReflection avatar WebReflection commented on May 27, 2024

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.

ije avatar ije commented on May 27, 2024

the name "py-script" has already been used with this registry

seems the package registries the element automatically

from esm.sh.

WebReflection avatar WebReflection commented on May 27, 2024

@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.

trusktr avatar trusktr commented on May 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.