Comments (2)
Ok, that makes sense.
I will fix the readme and also the demo app to reflect this.
Thanks!
from ngx-date-fns.
@MickL I tested the bundle size with webpack-bundle-analyzer
as you suggested but I think it's not working properly.
The command used to test tree shaking in this project is npm run analyze:app
which uses source-map-explorer
, and if you double-check with the actual main.js
size, it makes sense.
date-fns v2.19.0
date-fns v2.16.1
Issues with webpack-bundle-analyzer
I don't know the exact details about why the tool is not working properly, but I found a couple of places where they recommend aginst using it for Angular:
(source)
While the Angular CLI uses Webpack for some of its bundling, it also makes additional optimizations on top of Webpack. Because of these optimizations, it's important to use the source-map-explorer to test the final output and not the webpack-bundle-analyzer that is commonly used with Webpack based applications.
(source)
The angular team strongly recommends to only use source-map-explorer to analyze your bundle size instead of webpack-bundle-analyzer. According to them, webpack-bundle-analyzer and a few other similar tools doesn't give the actual info pertaining to angular build process.
Thanks for taking the time to explore this issue and for the v2.16.1
issue finding. I will add a note to the readme.
Cheers!
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
- 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.