Comments (7)
This is fixed in v2.1.1
https://www.npmjs.com/package/angular-datetimerangepicker
from angular-components.
Hi @szala12
Thanks for finding out this issue. Can you please provide some example codesandbox. also can you please confirm if this happens with ng build too? ng serve is not supposed to be ideally run with --prod true
Regarding older versions yes those are for angular-2 only. I doubt if they will work with angular 4 or not. So I dont recommend 1.x versions in angular 6 onwards.
from angular-components.
My bad, I should've mentioned it. I came across it after running ng build
in prod, that's how it came up in the first place. The ng serve --prod true
is only to help replicate on local. I'm not entirely sure how to replicate a prod issue in codesandbox, so if you could help me a little with that, that'd be great.
And yeah, we got the issue with [email protected] as well. I'm not completely sure here, but it looks like whatever webpack does when we build or serve with --prod true
, it breaks the import for your included dayjs library, the one in the node_modules directory inside your package.
from angular-components.
Yeah may be it will be difficult to make production bundle in codesandbox. But condesandbox can be used to sync with your github repo. https://codesandbox.io/s/github.
If you can create a github repo backed sandbox. It will help me to debug and see it works in non-prod bundles.
from angular-components.
@szala12 I was able to reproduce the problem.
Here are my findings
I guess is angulars build optimizer is removing dayjs extentions assuming they are not used. Seems like dayjs or my package needed to marked as not sideeffectfree
try setting "buildOptimizer": false
in your angular.json
Here is the difference in bundles sizes
As you can see the main bundle jumps from 451 to 586. Which is significant difference. I ll investigate more and let you know. Thanks for finding out the issue.
from angular-components.
@technikhil314 Hey. I am terribly sorry about the delay. As weird as this sounds to hear, I've logged this bug on behalf of a colleague who doesn't happen to be on GitHub and is not keen on joining, and they decided to move ahead with another library. I was planning on replicating it this weekend, with it being a holiday proper.
I will check it out with the buildOptimizer: false
flag and let you know. Thank you!
from angular-components.
No worries. As I guessed correctly I missed to mark my package to have side effects on dayjs since I am using some dayjs extentions. The next version I will release tomorrow will have it fixed. Thanks.
from angular-components.
Related Issues (20)
- Error import module HOT 1
- Getting error in angular-2-daterangepicke module while making build in angular 2 HOT 1
- First day of week HOT 4
- add option to remove clear button HOT 6
- bug report: cant import component HOT 7
- Few suggestions for better experience HOT 4
- "Auto Apply" not working HOT 5
- The next/previous button trigger submit form HOT 4
- Issue while installing with Angular 11. HOT 5
- Add custom locale HOT 2
- Excluded commit HOT 3
- Conflict with ionic-selectable HOT 2
- Request to support Angular reactive form formControlName to set the value directly to form field like some other bootstrap date range picker HOT 3
- Looks like somewhere console log on each even on document is getting logged and creating issue HOT 3
- Predefined Ranges don't work. HOT 1
- Better integrate with Material controls HOT 4
- Hide/Show the Clear button HOT 5
- Language support HOT 1
- DatetimerangepickerModule is not compatible with Angular Ivy HOT 1
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 angular-components.