{"action":"created","issue":{"url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/58","repository_url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin","labels_url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/58/comments","events_url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/58/events","html_url":"https://github.com/asfktz/autodll-webpack-plugin/issues/58","id":255820908,"number":58,"title":"Incompatibility with webpack-manifest-plugin","user":{"login":"sentience","id":89772,"avatar_url":"https://avatars3.githubusercontent.com/u/89772?v=4","gravatar_id":"","url":"https://api.github.com/users/sentience","html_url":"https://github.com/sentience","followers_url":"https://api.github.com/users/sentience/followers","following_url":"https://api.github.com/users/sentience/following{/other_user}","gists_url":"https://api.github.com/users/sentience/gists{/gist_id}","starred_url":"https://api.github.com/users/sentience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sentience/subscriptions","organizations_url":"https://api.github.com/users/sentience/orgs","repos_url":"https://api.github.com/users/sentience/repos","events_url":"https://api.github.com/users/sentience/events{/privacy}","received_events_url":"https://api.github.com/users/sentience/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-09-07T05:38:44Z","updated_at":"2018-02-12T17:52:24Z","closed_at":null,"author_association":"NONE","body":"We use https://github.com/danethurber/webpack-manifest-plugin to output a JSON manifest of source filenames to output filenames, which our application then uses to write the `<script>` and `<link>` tags, and other references to Webpack-compiled assets into our server-side HTML templates.\r\n\r\nUsing the manual setup for `DllPlugin`, this meant we were producing two JSON manifest files: one for the DLL build, and one for the main build.\r\n\r\nWith autodll-webpack-plugin, I can see the JSON manifest file generated by webpack-manifest-plugin for the DLL build gets written to the cache directory (along with the JavaScript bundle and the DllPlugin manifest file), but that file doesn't make it into the final Webpack output; only the JSON manifest file generated by webpack-manifest-plugin for the main build is output.\r\n\r\nSince the file is sitting there in the cache directory, I'm hoping there is some easy way to support plugins that generate additional assets on output."},"comment":{"url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/comments/365004980","html_url":"https://github.com/asfktz/autodll-webpack-plugin/issues/58#issuecomment-365004980","issue_url":"https://api.github.com/repos/asfktz/autodll-webpack-plugin/issues/58","id":365004980,"user":{"login":"stephencookdev","id":8496655,"avatar_url":"https://avatars1.githubusercontent.com/u/8496655?v=4","gravatar_id":"","url":"https://api.github.com/users/stephencookdev","html_url":"https://github.com/stephencookdev","followers_url":"https://api.github.com/users/stephencookdev/followers","following_url":"https://api.github.com/users/stephencookdev/following{/other_user}","gists_url":"https://api.github.com/users/stephencookdev/gists{/gist_id}","starred_url":"https://api.github.com/users/stephencookdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephencookdev/subscriptions","organizations_url":"https://api.github.com/users/stephencookdev/orgs","repos_url":"https://api.github.com/users/stephencookdev/repos","events_url":"https://api.github.com/users/stephencookdev/events{/privacy}","received_events_url":"https://api.github.com/users/stephencookdev/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T17:52:24Z","updated_at":"2018-02-12T17:52:24Z","author_association":"NONE","body":"You can generate just 1 manifest file by adding a custom `generate` function\r\n\r\n```javascript\r\nconst seed = {};\r\nconst generate = (_, files) => files.reduce((_, { name, path }) => {\r\n  // modify the shared seed object, so as to share it between the main and\r\n  // DLL compiler instance\r\n  seed[name] = path;\r\n  return seed;\r\n}),\r\n\r\nmodule.exports = {\r\n  plugins: [\r\n    new WebpackManifestPlugin({ generate, seed }),\r\n    new AutoDllPlugin({\r\n      plugins: [new WebpackManifestPlugin({ generate, seed, fileName: '_throwaway.json' })]\r\n    })\r\n  ]\r\n};\r\n```\r\n\r\nStill a bit hacky 😞 but generates 1 correct manifest file\r\n\r\nIn theory just doing the shared seed thing should solve the issue, but I'm guessing that something is causing the `AutoDllPlugin`'s `WebpackManifestPlugin` instance to run first, but then output last (causing the staler manifest file to overwrite the newer file - hence the need for the `_throwaway.json` file)"}}
{"actor":{"display_login":"stephencookdev"}}