Git Product home page Git Product logo

Comments (7)

frankwallis avatar frankwallis commented on May 20, 2024 2

I have created the above pull request which I hope will resolve this.

from tslib.

frankwallis avatar frankwallis commented on May 20, 2024

I am sorry this is causing problems. What is going on here is that tslib main is now configured to point at the ES module entry point - tslib.es6.js. This was done because systemjs 0.20 did not seem to be detecting the module type of the UMD version correctly (see frankwallis/plugin-typescript#199) and also it will enable rollup support to remove unused helper functions when bundling.

The workarounds I can think of are:
a) Provide a local override which points tslib main back to tslib.js
b) Change the registry to point main back to tslib.js but set the format of the file (probably to cjs?)

When you say SystemJS refuses to load the file, do you means it errors with 'export is not defined' or similar?

from tslib.

crisbeto avatar crisbeto commented on May 20, 2024

@frankwallis I've also been playing with this for a few hours. Here's what I have so far in regards to pointing to a different file:

packages: {
  "tslib": {
    "main": "tslib.js",
    "format": "amd"
  }
}

This loads, however SystemJS doesn't seem to be executing the file (errors along the lines of tslib_1.__metadata is not a function). I've tried playing with the format as well, but it doesn't help.

from tslib.

timfish avatar timfish commented on May 20, 2024

With [email protected] on my Windows PC jsm_packages/[email protected] is using require and on macOS it appears to be using the ES6 above.

How did I end up with them differing with the same version of tslib and jspm?

Edit
Ah, I see the registry has been updated!

from tslib.

thomas-darling avatar thomas-darling commented on May 20, 2024

Thus far, the only way I have managed to force it to work, was by
adding "npm:[email protected]": "jspm_packages/npm/[email protected]/tslib" to paths in config.js
and removing "format esm"; from the top of jspm_packages/[email protected]/tslib.js.

But obviously, this is not an acceptable fix, as we can't rely on modifying files like that - and I don't understand why it's adding "format esm"; to that file in the first place - it seems to be messed up.

from tslib.

aluanhaddad avatar aluanhaddad commented on May 20, 2024

Many apologies for the issues this caused. jspm/registry#1041 has now been merged. Please let us know if you continue to experience issues

from tslib.

orta avatar orta commented on May 20, 2024

Going to close this issue as it looks sorted πŸ‘πŸ»

from tslib.

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.