{"action":"closed","issue":{"url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin/issues/21","repository_url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin","labels_url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin/issues/21/comments","events_url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin/issues/21/events","html_url":"https://github.com/rxaviers/globalize-webpack-plugin/issues/21","id":140943025,"number":21,"title":"I18n compiled data ends up in app chunk instead of i18n chunk","user":{"login":"rxaviers","id":967155,"avatar_url":"https://avatars.githubusercontent.com/u/967155?v=3","gravatar_id":"","url":"https://api.github.com/users/rxaviers","html_url":"https://github.com/rxaviers","followers_url":"https://api.github.com/users/rxaviers/followers","following_url":"https://api.github.com/users/rxaviers/following{/other_user}","gists_url":"https://api.github.com/users/rxaviers/gists{/gist_id}","starred_url":"https://api.github.com/users/rxaviers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxaviers/subscriptions","organizations_url":"https://api.github.com/users/rxaviers/orgs","repos_url":"https://api.github.com/users/rxaviers/repos","events_url":"https://api.github.com/users/rxaviers/events{/privacy}","received_events_url":"https://api.github.com/users/rxaviers/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rxaviers/globalize-webpack-plugin/labels/Production%20mode","name":"Production mode","color":"0052cc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-15T11:22:44Z","updated_at":"2016-03-15T11:31:34Z","closed_at":"2016-03-15T11:31:34Z","body":"Impact\r\n\r\nOn production, I18n compiled data ends up in app chunk instead of i18n chunk. Therefore: (a) chunks are incorrectly ordered: vendor, app, i18n, which leads to unavailable formatters, and (b) the English version (or whatever the default locale is) gets leaked in the app as a garbage.\r\n\r\nHow to reproduce: I'm not sure, on a project I'm working on I've observed this issue. See description below.\r\n\r\nDescription:\r\n\r\nFor some unknown reason, certain modules (in webpack terms) don't show up in any chunks (in webpack terms) on `after-optimize-chunks`. Interestingly, the same module shows up in a chunk in the previous compilation step `optimize-chunks` what suggests that some chunk optimization may be making such change. Follow the [relevant piece of code](https://github.com/rxaviers/globalize-webpack-plugin/blob/de47d5a820b9ba46ea67ddf3de77ac72c292db3e/ProductionModePlugin.js#L119-L144).\r\n\r\nA proposed fix is to gather all modules in a step like `optimize-modules`, then on `after-optimize-chunks` use that list."}}