-
Notifications
You must be signed in to change notification settings - Fork 7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bugfix] Fix locale autoload, revert #3344 #3438
Conversation
e35d6fe
to
2f49f0c
Compare
I'm afraid not - with 2.15 + this diff, i'm now getting "SyntaxError: import declarations may only appear at top level of a module". I think this approach is defeating babel-node or webpack, because it's not a static |
How about now? |
That seems to do it for me, thanks! Looking forward to the patch release :-D |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
@ichernev thanks for fixing. Do you know when is the next patch release? |
3fddd3a
to
c3d2aed
Compare
I'll only revert #3344 for now, and release 2.15.1 |
Merged in 0d67e7e |
[bugfix] Fix locale autoload, revert #3344
Locale still doesnt work for me.. |
@gfviegas can you print output of |
@ichernev the output is: ["en"] Am I doing something wrong to import the locale? It stopped working when I upgraded my Ionic to RC 0 |
Any thoughts on my issue? |
@gfviegas your locale is not getting loaded. Put a console.log in it. Or it is, but it can't load moment, so it can't attach itself properly. This is not the most complicated system, and so far you're the only one complaining, so I'm expecting to be something in your setup (that is simple to debug), rather than a bug in moment. |
@ichernev thing is I don't know where I'm wrong on importing it. I'm following exactly the same example of the docs. Is my import code right? |
I said you need to debug it, I didn't say who is wrong or right, just where I'd expect to see the issue. You need to specify a reproducible environment if you want any external help. Most likely if you try to reproduce it cleanly you'll find the issue. Anyway, you can start by putting a few prints and seeing whether the locale file is downloaded and executed to start with. |
@ichernev I had to import 'moment/src/locale/pt-br'; instead of import 'moment/locale/pt-br'; to make it work. I have no idea why. |
This is a redo of #3344 that doesn't (hopefully) break karma + phantomjs -- #3431.
@ljharb @yiminghe let me know if that works for both of you.