-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Intl.js 404 Not Found #61
Comments
More than likely you need to actually add it to your bundle config so that it ends up in the distributable bundle. |
Ok, I just thought that it would be added since it is a dependency for the aurelia-i18n plugin, which is added to the bundle. i18next is another example of a dependency for that plugin, and that is added without me explicitly saying so. |
@zewa666 Can you provide input on this? Is the Intl.js library statically imported or is it dynamically imported? I'm assuming it is loaded based on need. If that is the case, can you identify which browsers need it and which don't? Also can you update the docs to indicate that if supporting browsers that need it, then the bundle config will need to be appended? |
@EisenbergEffect yes the dependency on the i18n polyfill is a dynamic one. Browsers like Safari or IE < 11 and Node.JS do not provide a default implementation. Will create the README update. |
@zewa666 stupid question: other than in the tests i don't find a dependency on Intl.js anywhere. in that case moving it to devDependency would remove some problems |
Intl.js is loaded on demand if needed. Means if the browser or environment does not fully or at all support the Javascript Internationalization API, the plugin will load the polyfill. So no, moving it to a devDependency thus is no option |
document how the intl polyfill is used and that manual bundling configuration is needed fixes issue #61 (comment)
Where is the documentation on how to bundle the polyfill? This is working fine on Chrome, but on Safari I see: "Intl API is not available. Trying to load the polyfill." This occurs even when running in live dev mode (npm start, in the typescript-webpack skeleton). How do we get the polyfill to be included? Thanks, |
OK, I do see the README information about the polyfill, but it is referring to modifying the aurelia bootstrap() function. However, in the typescript-webpack skeleton, there is no bootstrap() function - it uses the configure() function in main.js. Can we also get documentation on how to adjust the aurelia configure() function for this? Thanks, |
I'm having the same issue. Any documentation on how to include the polyfill when using Aurelia with |
@ben-girardet the best thing is to follow this guide on how to install the plugin with AureliaCLI. http://pragmatic-coder.net/installing-the-aurelia-i18n-plugin-in-a-cli-app/ on top of that in order to install the Polyfill, you'd additionally run
|
Thanks @zewa666 I was missing the part in the |
Hi
When running the a bundled version of my application I get the following error in Safari:
Here is some parts of my config.js (I have exluded the parts I meant to be irrelevant in this case):
Can you help me solve this?
The text was updated successfully, but these errors were encountered: