Open srl295 opened 10 years ago
Think the answer may lie in adding requirejs boilerplate or using amintercept
Hey @srl295, someone from the project might give a better answer, but as I can tell this implementation uses pure AMD modules. So, you need to use an AMD loader (eg. amd-loader). Although, I'm not sure how to deal with the json plugins.
In order to avoid such dependency and to get Node.js supported natively, the distribution files could be UMD wrapped.
@rxaviers Hi! Nice to see you here also besides ICU! amd-loader
looks pretty easy to use. Wonder if just adding the right npm-visible stuff to this project (maybe a node-intl.js
or something that just has require('amd-loader'); global.exports = require('./Intl')
or something like that?
I'm hoping @clmath can give me some guidance here. We do want the package to work properly under Node.js.
I think there are two things here, the packaging for which UMD (see @rxaviers link) is probably the solution we want to go with and the fact all the modules are loading/working correctly on Node.JS and here I think @clmath found some issues that need to be fixed.
I didn't investigate this much, but it looks like the library can't load under node (
define is not defined
). Is it possible?