Open ghost opened 4 years ago
Hi, which date-fns version is your app using?
The only change is https://github.com/makepanic/ember-power-calendar-date-fns/commit/22257e5fcbcedc02f4a2c9dad523a756a0570ae8 which changes it to use module imports directly.
See https://date-fns.org/docs/Getting-Started#submodules
I guess that means date-fns@1 has no submodule method exports :thinking: Can you bump date-fns to version 2?
I made this change because it allows ember-auto-import to minify the package better.
My app is using date-fns@2.9.0
.
Are you using 0.4.2 in an app?
I'm using ember-power-calendar@0.13.3
, ember@3.13.1
and ember-auto-import@1.5.3
.
I will test a bit and let you know, sounds like a issue with our app.
Is the error thrown from within your app code or from the ember-power-calendar package?
Is date-fns
part of your dev/dependencies list? I can reproduce a similar error if I remove date-fns
from my devDependencies.
This makes sense though, as we're importing from date-fns in our app too.
it is thrown within my app code.
:thinking: date-fns
is part of my dependencies list inside an other addon (addon A) which my app is using, not the addon (addon B) which requires ember-power-calendar.
Yea, by adding date-fns
as dependency to the addon B is working
so i guess this is intended and i should include date-fns
as dependency?
I think so.
If i create a vanilla project that uses power calendar + power calendar date-fns it works fine.
I think it's ok to let consumers explicitly depend on date-fns if they want to use it.
I'm getting now the following js error in our app:
Not sure why, as I didn't change anything but updating
ember-power-calendar-date-fns
from 0.4.1 to 0.4.2.When I force the version to 0.4.1 it works normally. Could also be a Issue with the implementation inside our app, but we are not doing anything special.
Do you have a clue why this happens?