Giter VIP home page Giter VIP logo

Comments (4)

jvanbruegge avatar jvanbruegge commented on June 8, 2024

This wouldn't be a problem if we were able to use ES module versions of the packages (rather than bundled cjs)

Why can't you use ES modules?

from time.

willheslam avatar willheslam commented on June 8, 2024

If I yarn add @cycle/time, it installs the package compiled down to cjs.

eg. rxjs.js looks like

"use strict";
exports.__esModule = true;
var Observable_1 = require("rxjs/Observable");
require("rxjs/add/observable/from");
var adapt_1 = require("@cycle/run/lib/adapt");
var mock_time_source_1 = require("./dist/mock-time-source");
var time_driver_1 = require("./dist/time-driver");
adapt_1.setAdapt(function (stream) { return Observable_1.Observable.from(stream); });
function mockTimeSource(args) {
    return mock_time_source_1.mockTimeSource(args);
}
exports.mockTimeSource = mockTimeSource;
function timeDriver(_, adapter) {
    return time_driver_1.timeDriver(_, adapter);
}
exports.timeDriver = timeDriver;

Am I missing some yarn or npm command to pull in an ES module version?

(From my experience adding the package from github and trying to use the ts files directly (e.g. using tsloader and webpack) has never seemed to work well - maybe I should pull it in from github then try to compile it from typescript to an es module version before bundling?)

from time.

Widdershin avatar Widdershin commented on June 8, 2024

Ugh, good catch. Can you please open this over on the cyclejs repo, this repo is soon to be closed down? We definitely need to do something about this, and maybe set up a package size benchmark to prevent further unintentional bloat.

from time.

willheslam avatar willheslam commented on June 8, 2024

Can do! @Widdershin cyclejs/cyclejs#660

from time.

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.