{"action":"created","issue":{"url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/169","repository_url":"https://api.github.com/repos/ctrlplusb/react-universally","labels_url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/169/comments","events_url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/169/events","html_url":"https://github.com/ctrlplusb/react-universally/issues/169","id":188035187,"number":169,"title":"DllPlugin: the .jsx files are they bundled?","user":{"login":"enten","id":977713,"avatar_url":"https://avatars.githubusercontent.com/u/977713?v=3","gravatar_id":"","url":"https://api.github.com/users/enten","html_url":"https://github.com/enten","followers_url":"https://api.github.com/users/enten/followers","following_url":"https://api.github.com/users/enten/following{/other_user}","gists_url":"https://api.github.com/users/enten/gists{/gist_id}","starred_url":"https://api.github.com/users/enten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enten/subscriptions","organizations_url":"https://api.github.com/users/enten/orgs","repos_url":"https://api.github.com/users/enten/repos","events_url":"https://api.github.com/users/enten/events{/privacy}","received_events_url":"https://api.github.com/users/enten/received_events","type":"User","site_admin":false},"labels":[{"id":392784878,"url":"https://api.github.com/repos/ctrlplusb/react-universally/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-08T16:15:50Z","updated_at":"2016-11-08T16:35:58Z","closed_at":null,"body":"File: [tools/development/ensureVendorDLLExists.js](https://github.com/ctrlplusb/react-universally/blob/master/tools/development/ensureVendorDLLExists.js)\r\n\r\nI think **there is a mistake when the modules list** is computed.\r\n\r\nIndeed, `jsx` extension [is allowed](https://github.com/ctrlplusb/react-universally/blob/51f788f3fa2febf5327fa7d7e50901976358809d/tools/webpack/configFactory.js#L177) by the [tools/webpack/configFactory](https://github.com/ctrlplusb/react-universally/blob/master/tools/webpack/configFactory.js).\r\n\r\nBut, the `getJsFilesFromSrcDir` function (in `ensureVendorDLLExists.js`) catch `**/*.js` files only.\r\n\r\n```javascript\r\nfunction getJsFilesFromSrcDir(srcPath) {\r\n  return globSync(`${pathResolve(appRootPath, 'src', srcPath)}/**/*.js`);\r\n}\r\n```\r\n\r\nHow about the `.jsx` files? **I think they are skipped.**"},"comment":{"url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/comments/259187579","html_url":"https://github.com/ctrlplusb/react-universally/issues/169#issuecomment-259187579","issue_url":"https://api.github.com/repos/ctrlplusb/react-universally/issues/169","id":259187579,"user":{"login":"enten","id":977713,"avatar_url":"https://avatars.githubusercontent.com/u/977713?v=3","gravatar_id":"","url":"https://api.github.com/users/enten","html_url":"https://github.com/enten","followers_url":"https://api.github.com/users/enten/followers","following_url":"https://api.github.com/users/enten/following{/other_user}","gists_url":"https://api.github.com/users/enten/gists{/gist_id}","starred_url":"https://api.github.com/users/enten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enten/subscriptions","organizations_url":"https://api.github.com/users/enten/orgs","repos_url":"https://api.github.com/users/enten/repos","events_url":"https://api.github.com/users/enten/events{/privacy}","received_events_url":"https://api.github.com/users/enten/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T16:35:58Z","updated_at":"2016-11-08T16:35:58Z","body":"I suggest:\r\n\r\n```javascript\r\nconst JS_FILE_EXTENSIONS = ['js', 'jsx'];\r\n\r\nfunction getJsFilesFromSrcDir(srcPath) {\r\n  return JS_FILE_EXTENSIONS\r\n    .reduce((acc, ext) =>\r\n      acc.concat(globSync(`${pathResolve(appRootPath, 'src', srcPath)}/**/*.${ext}`))\r\n    .filter((file) => ~JS_FILE_EXTENSIONS.indexOf(pathExtName(file)));\r\n}\r\n```\r\n\r\nSo, in `buildVendorDLL` function, we don't need to check files extension anymore:\r\n`-` ~~`const isJsFile = file => pathExtName(file) === '.js';`~~\r\n`-` ~~`const allJSFiles = [...clientFiles, ...universalFiles].filter(isJsFile);`~~\r\n`+` `const allJSFiles = [...clientFiles, ...universalFiles];`\r\n\r\n> Would you be interested in becoming a collaborator on this project and doing a PR to fix this? :)\r\n\r\nIf I can make real contributions, why not :)"}}
{"actor":{"display_login":"enten"}}