GithubHelp home page GithubHelp logo

Comments (10)

alexeagle avatar alexeagle commented on May 4, 2024 4

Improved
image
but still needs work

from angular-bazel-example.

thelgevold avatar thelgevold commented on May 4, 2024

Maybe it makes sense to include a simple plugin to resolve to rxjs esm
I have something here:

https://github.com/thelgevold/angular-2-samples/blob/master/rollup/resolve-esm.js

from angular-bazel-example.

thelgevold avatar thelgevold commented on May 4, 2024

This removes the need for the commonjs plugin (for rxjs). Unless you plan to use it for other libraries later...

from angular-bazel-example.

pshields avatar pshields commented on May 4, 2024

When I check the produced bundle for my app using the rollup_bundle rule, there were 21 separate definitions of Observable (Observable through Observable$20.) It looks like the library may be included a large number of times.

Potentially related: when I first set up my rollup_bundle target, in the places of my code where I import rxjs/Observable, Rollup complained about not knowing where to find Observable, so it treated it as a global (even though it still defined several local Observable$N local variables inside of the IIFE.) My app wouldn't work until I added node_modules/rxjs/** back into my //:node_modules filegroup.

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 4, 2024

bazelbuild/rules_nodejs@5016083 should fix this issue with rxjs - we should depend on the files built by bazel, not the rxjs distribution.

Misko found today that we are also missing the Angular Build Optimizer in this path, which does things like these /* @__PURE__ */ annotations that tell uglify that some code can be removed, I'll wire that up next.

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 4, 2024

We built it again today and it's under 350,000 bytes uncompressed. We are in the ballpark. Working on hooking up @angular-devkit/build-optimizer, maybe need @IgorMinar to help next week.

from angular-bazel-example.

elvisbegovic avatar elvisbegovic commented on May 4, 2024

i tried to serve example on my mac and I think this issue is related, when ibazel run src:devserver i get this

and when ibazel run src:prodserver i get this output

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 4, 2024

@istiti I don't see how that's related to this issue?

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 4, 2024

from angular-bazel-example.

alexeagle avatar alexeagle commented on May 4, 2024

Not doing more work on this - new rollup_bundle rule does the same thing you would do outside Bazel so it's not a problem in our scope

from angular-bazel-example.

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.