iLib question.

I'm working on a app that will be translted into French and German, but I've started just with English, and its seems to work well, but when I run enyo pack, to get the dist directory, the enyo-ilib\ilib\locale directory contains loads of sub directories for every locale on the planet as far as I can tell, is there any way of making it only include the locale I want?


  • There isn't a configuration for that as far as I know. The simplest solution would likely be to update enyo-ilib's assets config in its package.json to only include the relevant locales. Haven't tried that myself but seems like a reasonable solution.
  • Tried that it worked a charm, thanks.
  • Tim, if you think this might be useful to others you could submit a pull request to our docs repo describing what you did.
  • Hi.
    Let’s say I don’t need “ilib”. I have noticed that when I pack my app I have a lot of .js files regarding to ilib tool.
    Since I have a problem in the device of lack of performance in load-time, It would be of outmost importance to exclude all the .js I can.
    Is there any direct/easy way to minimize this situation?
    I know that some moonstone components require ilib and that’s why I need help.
    Other thing it’s the amount of 404 request generated by ilib.

    I already have a B plan that consist in create a unique .js file to create a "dumb" ilib containing only the signature methods, but it would be welcome a second opinion/idea.
  • ilib is a required dependency of moonstone in 2.7 so there isn't a framework or build solution. An option for improving initial render performance is using the request() method instead of require. Not sure how much, if any?, doc exists for this but in short it will asynchronously load the module and any dependencies before resolving. So from your app's home screen, you could request the next views (either on load or as needed) trading improved initial load performance for potentially lower initial sub-view rendering.
    // untested pseudo-code :)
        subView = request('./subview');
    // elsewhere
    handleClick: function (sender, ev) {
        subView.then(function (view) {
            // view is the actual module export
            this.createComponent({kind: view});
Sign In or Register to comment.