Comments (6)
Hi @unsafecode , thanks for reporting.
I'll take a look ASAP.
Cheers!
from ngx-date-fns.
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.
@joanllenas : As date-fns v2 is released. do we have any update on this open issue.
from ngx-date-fns.
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.
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.
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)
- Pipes isToday, isWeekend, isSameMonth HOT 4
- IsSameYear pipe HOT 3
- Support date-fns-tz HOT 8
- Add dfnsParseIso pipe HOT 2
- Allow empty value (Prevent throwing "Invalid time value") HOT 4
- Documentation for lazy loaded modules HOT 1
- Support `strictTemplates` / All pipes should accept null and undefined HOT 4
- ngx-date-fns.js depends on 'date-fns/parseISO'. CommonJS or AMD dependencies can cause optimization bailouts HOT 7
- FR: Add *Duration pipes HOT 2
- IsEqual Pipe HOT 2
- "CommonJS or AMD" warnings HOT 9
- Documentation about tree shaking is not correct HOT 2
- FR: dfnsFormatRelativeToNow HOT 4
- is*() functions are missing HOT 5
- What is the amLocal equivalent of ngx-moment? HOT 2
- Angular 13 : "Encourage the library authors to publish an Ivy distribution" HOT 8
- Angular 14 support HOT 7
- Angular 16 support HOT 4
- date-fns 3.x support HOT 5
- Auto-detect language HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx-date-fns.