Git Product home page Git Product logo

Comments (7)

technikhil314 avatar technikhil314 commented on June 16, 2024 1

This is fixed in v2.1.1

https://www.npmjs.com/package/angular-datetimerangepicker

from angular-components.

technikhil314 avatar technikhil314 commented on June 16, 2024

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.

essnine avatar essnine commented on June 16, 2024

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.

technikhil314 avatar technikhil314 commented on June 16, 2024

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.

technikhil314 avatar technikhil314 commented on June 16, 2024

@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

With build optimizer enabled
Screenshot 2020-11-13 at 9 18 43 PM

without build optimizer
Screenshot 2020-11-13 at 9 20 32 PM

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.

essnine avatar essnine commented on June 16, 2024

@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.

technikhil314 avatar technikhil314 commented on June 16, 2024

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)

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.