Coder Social home page Coder Social logo

Comments (6)

joanllenas avatar joanllenas commented on May 19, 2024

Hi @unsafecode , thanks for reporting.
I'll take a look ASAP.

Cheers!

from ngx-date-fns.

joanllenas avatar joanllenas commented on May 19, 2024

Hi @unsafecode
I upgraded to Angular 7 hoping that tree shaking would have been improved somehow but I'm having the same issues.

Not sure if there's something I can do until date-fns v2 is released.
Take a look at this: https://github.com/date-fns/date-fns/blob/master/docs/esm.md

Suggestions / PRs are welcomed!

from ngx-date-fns.

gmanoj26 avatar gmanoj26 commented on May 19, 2024

@joanllenas : As date-fns v2 is released. do we have any update on this open issue.

from ngx-date-fns.

joanllenas avatar joanllenas commented on May 19, 2024

Hi @gmanoj26 ,
I took a look a while ago and didn't find a solution to the problem. V2 by itself didn't solve the issue.
Maybe, for this to work we need something like what this article suggests; one pipe per module; but I think it's not a good idea given the number of pipes this library contains.

I'm open to discussing possible solutions if someone has the time to investigate.

from ngx-date-fns.

joanllenas avatar joanllenas commented on May 19, 2024

I added a section about tree shaking in the docs.
I hope this helps: https://github.com/joanllenas/ngx-date-fns#tree-shaking-date-fns

from ngx-date-fns.

KingDarBoja avatar KingDarBoja commented on May 19, 2024

In order to make each pipe tree-shakable, those must be provided as secondary entry points (as stated by the article, 1 pipe per entry point / module). It can be easily done using ng-samurai schematics.

Willing to look into this as I am using this library but not being tree-shakable atm.

from ngx-date-fns.

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.