{"action":"created","comment":{"url":"https://api.github.com/repos/prebid/Prebid.js/pulls/comments/122726452","pull_request_review_id":44852384,"id":122726452,"diff_hunk":"@@ -1,25 +1,46 @@\n var prebid = require('./package.json');\n var StringReplacePlugin = require('string-replace-webpack-plugin');\n var path = require('path');\n+var webpack = require('webpack');\n+var helpers = require('./gulpHelpers');\n+var RequireEnsureWithoutJsonp = require('./plugins/RequireEnsureWithoutJsonp.js');\n+\n+// list of module names to never include in the common bundle chunk\n+var neverBundle = [\n+  'AnalyticsAdapter.js'\n+];\n \n module.exports = {\n-  output: {\n-    filename: 'prebid.js'\n-  },\n   devtool: 'source-map',\n   resolve: {\n-    modulesDirectories: ['', 'node_modules', 'src']\n+    root: [\n+      path.resolve('.')\n+    ],\n+    modulesDirectories: ['', 'node_modules']\n   },\n   resolveLoader: {\n-    modulesDirectories: ['loaders', 'node_modules']\n+    root: [\n+      path.resolve('./loaders'),\n+      path.resolve('./node_modules')\n+    ]\n+  },\n+  output: {\n+    jsonpFunction: 'pbjsChunk'\n   },\n   module: {\n     loaders: [\n       {\n         test: /\\.js$/,\n-        include: /(src|test)/,\n-        exclude: path.resolve(__dirname, 'node_modules'),\n-        loader: 'babel', // 'babel-loader' is also a legal name to reference\n+        exclude: path.resolve('./node_modules'), // required to prevent loader from choking non-Prebid.js node_modules\n+        loader: 'babel',\n+        query: {\n+          presets: ['es2015']\n+        }\n+      },\n+      { // This makes sure babel-loader is ran on our intended Prebid.js modules that happen to be in node_modules","path":"webpack.conf.js","position":48,"original_position":48,"commit_id":"80e395509fd2b5a5bfa401b559b805df0aafef99","original_commit_id":"80e395509fd2b5a5bfa401b559b805df0aafef99","user":{"login":"dbemiller","id":27972385,"avatar_url":"https://avatars1.githubusercontent.com/u/27972385?v=3","gravatar_id":"","url":"https://api.github.com/users/dbemiller","html_url":"https://github.com/dbemiller","followers_url":"https://api.github.com/users/dbemiller/followers","following_url":"https://api.github.com/users/dbemiller/following{/other_user}","gists_url":"https://api.github.com/users/dbemiller/gists{/gist_id}","starred_url":"https://api.github.com/users/dbemiller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbemiller/subscriptions","organizations_url":"https://api.github.com/users/dbemiller/orgs","repos_url":"https://api.github.com/users/dbemiller/repos","events_url":"https://api.github.com/users/dbemiller/events{/privacy}","received_events_url":"https://api.github.com/users/dbemiller/received_events","type":"User","site_admin":false},"body":"am confused... aren't the Prebid modules stored in `modules`?","created_at":"2017-06-19T14:42:24Z","updated_at":"2017-06-19T14:42:29Z","html_url":"https://github.com/prebid/Prebid.js/pull/1177#discussion_r122726452","pull_request_url":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177","_links":{"self":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/comments/122726452"},"html":{"href":"https://github.com/prebid/Prebid.js/pull/1177#discussion_r122726452"},"pull_request":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177"}}},"pull_request":{"url":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177","id":119048811,"html_url":"https://github.com/prebid/Prebid.js/pull/1177","diff_url":"https://github.com/prebid/Prebid.js/pull/1177.diff","patch_url":"https://github.com/prebid/Prebid.js/pull/1177.patch","issue_url":"https://api.github.com/repos/prebid/Prebid.js/issues/1177","number":1177,"state":"open","locked":false,"title":"Modules","user":{"login":"snapwich","id":551085,"avatar_url":"https://avatars0.githubusercontent.com/u/551085?v=3","gravatar_id":"","url":"https://api.github.com/users/snapwich","html_url":"https://github.com/snapwich","followers_url":"https://api.github.com/users/snapwich/followers","following_url":"https://api.github.com/users/snapwich/following{/other_user}","gists_url":"https://api.github.com/users/snapwich/gists{/gist_id}","starred_url":"https://api.github.com/users/snapwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapwich/subscriptions","organizations_url":"https://api.github.com/users/snapwich/orgs","repos_url":"https://api.github.com/users/snapwich/repos","events_url":"https://api.github.com/users/snapwich/events{/privacy}","received_events_url":"https://api.github.com/users/snapwich/received_events","type":"User","site_admin":false},"body":"## Type of change\r\n- [x] Feature\r\n- [x] Refactoring (no functional changes, no api changes)\r\n- [x] Build related changes\r\n\r\n## Description of change\r\nThe module system as described in #1086\r\n\r\nFor an example of converting an existing adapter to a module look at the adaption in file `src/adapters/rubicon.js` to `modules/rubiconAdapter.js` and tests from `test/spec/adapters/rubicon_spec.js` to `test/spec/modules/rubiconAdapter_spec.js`.\r\n\r\nNew `express` module was added as well.  With the new `express` module and the conversion of the rubcion adapter to a module the build currently spits out 3 files: `prebid.js`, `express.js`, and `rubiconAdapter.js`.  These can then being bundled for usage after `gulp` is run using `gulp bundle --modules=express,rubiconAdapter`.  The `--modules` flag is optional if you just want to bundle all modules found.\r\n\r\n","created_at":"2017-05-04T19:29:03Z","updated_at":"2017-06-19T14:42:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e3c9d8b4f6c3509fad37f6a1447e065bf913631c","assignee":{"login":"snapwich","id":551085,"avatar_url":"https://avatars0.githubusercontent.com/u/551085?v=3","gravatar_id":"","url":"https://api.github.com/users/snapwich","html_url":"https://github.com/snapwich","followers_url":"https://api.github.com/users/snapwich/followers","following_url":"https://api.github.com/users/snapwich/following{/other_user}","gists_url":"https://api.github.com/users/snapwich/gists{/gist_id}","starred_url":"https://api.github.com/users/snapwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapwich/subscriptions","organizations_url":"https://api.github.com/users/snapwich/orgs","repos_url":"https://api.github.com/users/snapwich/repos","events_url":"https://api.github.com/users/snapwich/events{/privacy}","received_events_url":"https://api.github.com/users/snapwich/received_events","type":"User","site_admin":false},"assignees":[{"login":"snapwich","id":551085,"avatar_url":"https://avatars0.githubusercontent.com/u/551085?v=3","gravatar_id":"","url":"https://api.github.com/users/snapwich","html_url":"https://github.com/snapwich","followers_url":"https://api.github.com/users/snapwich/followers","following_url":"https://api.github.com/users/snapwich/following{/other_user}","gists_url":"https://api.github.com/users/snapwich/gists{/gist_id}","starred_url":"https://api.github.com/users/snapwich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snapwich/subscriptions","organizations_url":"https://api.github.com/users/snapwich/orgs","repos_url":"https://api.github.com/users/snapwich/repos","events_url":"https://api.github.com/users/snapwich/events{/privacy}","received_events_url":"https://api.github.com/users/snapwich/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"matthewlane","id":924348,"avatar_url":"https://avatars0.githubusercontent.com/u/924348?v=3","gravatar_id":"","url":"https://api.github.com/users/matthewlane","html_url":"https://github.com/matthewlane","followers_url":"https://api.github.com/users/matthewlane/followers","following_url":"https://api.github.com/users/matthewlane/following{/other_user}","gists_url":"https://api.github.com/users/matthewlane/gists{/gist_id}","starred_url":"https://api.github.com/users/matthewlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthewlane/subscriptions","organizations_url":"https://api.github.com/users/matthewlane/orgs","repos_url":"https://api.github.com/users/matthewlane/repos","events_url":"https://api.github.com/users/matthewlane/events{/privacy}","received_events_url":"https://api.github.com/users/matthewlane/received_events","type":"User","site_admin":false},{"login":"mkendall07","id":1870166,"avatar_url":"https://avatars0.githubusercontent.com/u/1870166?v=3","gravatar_id":"","url":"https://api.github.com/users/mkendall07","html_url":"https://github.com/mkendall07","followers_url":"https://api.github.com/users/mkendall07/followers","following_url":"https://api.github.com/users/mkendall07/following{/other_user}","gists_url":"https://api.github.com/users/mkendall07/gists{/gist_id}","starred_url":"https://api.github.com/users/mkendall07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkendall07/subscriptions","organizations_url":"https://api.github.com/users/mkendall07/orgs","repos_url":"https://api.github.com/users/mkendall07/repos","events_url":"https://api.github.com/users/mkendall07/events{/privacy}","received_events_url":"https://api.github.com/users/mkendall07/received_events","type":"User","site_admin":false},{"login":"jaiminpanchal27","id":7393273,"avatar_url":"https://avatars1.githubusercontent.com/u/7393273?v=3","gravatar_id":"","url":"https://api.github.com/users/jaiminpanchal27","html_url":"https://github.com/jaiminpanchal27","followers_url":"https://api.github.com/users/jaiminpanchal27/followers","following_url":"https://api.github.com/users/jaiminpanchal27/following{/other_user}","gists_url":"https://api.github.com/users/jaiminpanchal27/gists{/gist_id}","starred_url":"https://api.github.com/users/jaiminpanchal27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaiminpanchal27/subscriptions","organizations_url":"https://api.github.com/users/jaiminpanchal27/orgs","repos_url":"https://api.github.com/users/jaiminpanchal27/repos","events_url":"https://api.github.com/users/jaiminpanchal27/events{/privacy}","received_events_url":"https://api.github.com/users/jaiminpanchal27/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177/commits","review_comments_url":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177/comments","review_comment_url":"https://api.github.com/repos/prebid/Prebid.js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prebid/Prebid.js/issues/1177/comments","statuses_url":"https://api.github.com/repos/prebid/Prebid.js/statuses/80e395509fd2b5a5bfa401b559b805df0aafef99","head":{"label":"rubicon-project:modules","ref":"modules","sha":"80e395509fd2b5a5bfa401b559b805df0aafef99","user":{"login":"rubicon-project","id":367823,"avatar_url":"https://avatars0.githubusercontent.com/u/367823?v=3","gravatar_id":"","url":"https://api.github.com/users/rubicon-project","html_url":"https://github.com/rubicon-project","followers_url":"https://api.github.com/users/rubicon-project/followers","following_url":"https://api.github.com/users/rubicon-project/following{/other_user}","gists_url":"https://api.github.com/users/rubicon-project/gists{/gist_id}","starred_url":"https://api.github.com/users/rubicon-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubicon-project/subscriptions","organizations_url":"https://api.github.com/users/rubicon-project/orgs","repos_url":"https://api.github.com/users/rubicon-project/repos","events_url":"https://api.github.com/users/rubicon-project/events{/privacy}","received_events_url":"https://api.github.com/users/rubicon-project/received_events","type":"Organization","site_admin":false},"repo":{"id":49384267,"name":"Prebid.js","full_name":"rubicon-project/Prebid.js","owner":{"login":"rubicon-project","id":367823,"avatar_url":"https://avatars0.githubusercontent.com/u/367823?v=3","gravatar_id":"","url":"https://api.github.com/users/rubicon-project","html_url":"https://github.com/rubicon-project","followers_url":"https://api.github.com/users/rubicon-project/followers","following_url":"https://api.github.com/users/rubicon-project/following{/other_user}","gists_url":"https://api.github.com/users/rubicon-project/gists{/gist_id}","starred_url":"https://api.github.com/users/rubicon-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubicon-project/subscriptions","organizations_url":"https://api.github.com/users/rubicon-project/orgs","repos_url":"https://api.github.com/users/rubicon-project/repos","events_url":"https://api.github.com/users/rubicon-project/events{/privacy}","received_events_url":"https://api.github.com/users/rubicon-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubicon-project/Prebid.js","description":"Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.","fork":true,"url":"https://api.github.com/repos/rubicon-project/Prebid.js","forks_url":"https://api.github.com/repos/rubicon-project/Prebid.js/forks","keys_url":"https://api.github.com/repos/rubicon-project/Prebid.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubicon-project/Prebid.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubicon-project/Prebid.js/teams","hooks_url":"https://api.github.com/repos/rubicon-project/Prebid.js/hooks","issue_events_url":"https://api.github.com/repos/rubicon-project/Prebid.js/issues/events{/number}","events_url":"https://api.github.com/repos/rubicon-project/Prebid.js/events","assignees_url":"https://api.github.com/repos/rubicon-project/Prebid.js/assignees{/user}","branches_url":"https://api.github.com/repos/rubicon-project/Prebid.js/branches{/branch}","tags_url":"https://api.github.com/repos/rubicon-project/Prebid.js/tags","blobs_url":"https://api.github.com/repos/rubicon-project/Prebid.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubicon-project/Prebid.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubicon-project/Prebid.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubicon-project/Prebid.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubicon-project/Prebid.js/statuses/{sha}","languages_url":"https://api.github.com/repos/rubicon-project/Prebid.js/languages","stargazers_url":"https://api.github.com/repos/rubicon-project/Prebid.js/stargazers","contributors_url":"https://api.github.com/repos/rubicon-project/Prebid.js/contributors","subscribers_url":"https://api.github.com/repos/rubicon-project/Prebid.js/subscribers","subscription_url":"https://api.github.com/repos/rubicon-project/Prebid.js/subscription","commits_url":"https://api.github.com/repos/rubicon-project/Prebid.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubicon-project/Prebid.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubicon-project/Prebid.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubicon-project/Prebid.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubicon-project/Prebid.js/contents/{+path}","compare_url":"https://api.github.com/repos/rubicon-project/Prebid.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubicon-project/Prebid.js/merges","archive_url":"https://api.github.com/repos/rubicon-project/Prebid.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubicon-project/Prebid.js/downloads","issues_url":"https://api.github.com/repos/rubicon-project/Prebid.js/issues{/number}","pulls_url":"https://api.github.com/repos/rubicon-project/Prebid.js/pulls{/number}","milestones_url":"https://api.github.com/repos/rubicon-project/Prebid.js/milestones{/number}","notifications_url":"https://api.github.com/repos/rubicon-project/Prebid.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubicon-project/Prebid.js/labels{/name}","releases_url":"https://api.github.com/repos/rubicon-project/Prebid.js/releases{/id}","deployments_url":"https://api.github.com/repos/rubicon-project/Prebid.js/deployments","created_at":"2016-01-10T20:32:23Z","updated_at":"2017-01-03T23:57:51Z","pushed_at":"2017-06-16T19:57:02Z","git_url":"git://github.com/rubicon-project/Prebid.js.git","ssh_url":"git@github.com:rubicon-project/Prebid.js.git","clone_url":"https://github.com/rubicon-project/Prebid.js.git","svn_url":"https://github.com/rubicon-project/Prebid.js","homepage":"http://prebid.org","size":2972,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"prebid:master","ref":"master","sha":"a31864253e7d4edf4c4948d77e835de3e36b72c9","user":{"login":"prebid","id":13242760,"avatar_url":"https://avatars2.githubusercontent.com/u/13242760?v=3","gravatar_id":"","url":"https://api.github.com/users/prebid","html_url":"https://github.com/prebid","followers_url":"https://api.github.com/users/prebid/followers","following_url":"https://api.github.com/users/prebid/following{/other_user}","gists_url":"https://api.github.com/users/prebid/gists{/gist_id}","starred_url":"https://api.github.com/users/prebid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prebid/subscriptions","organizations_url":"https://api.github.com/users/prebid/orgs","repos_url":"https://api.github.com/users/prebid/repos","events_url":"https://api.github.com/users/prebid/events{/privacy}","received_events_url":"https://api.github.com/users/prebid/received_events","type":"Organization","site_admin":false},"repo":{"id":39321023,"name":"Prebid.js","full_name":"prebid/Prebid.js","owner":{"login":"prebid","id":13242760,"avatar_url":"https://avatars2.githubusercontent.com/u/13242760?v=3","gravatar_id":"","url":"https://api.github.com/users/prebid","html_url":"https://github.com/prebid","followers_url":"https://api.github.com/users/prebid/followers","following_url":"https://api.github.com/users/prebid/following{/other_user}","gists_url":"https://api.github.com/users/prebid/gists{/gist_id}","starred_url":"https://api.github.com/users/prebid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prebid/subscriptions","organizations_url":"https://api.github.com/users/prebid/orgs","repos_url":"https://api.github.com/users/prebid/repos","events_url":"https://api.github.com/users/prebid/events{/privacy}","received_events_url":"https://api.github.com/users/prebid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prebid/Prebid.js","description":"Setup and manage header bidding advertising partners without writing code or confusing line items. Prebid.js is open source and free.","fork":false,"url":"https://api.github.com/repos/prebid/Prebid.js","forks_url":"https://api.github.com/repos/prebid/Prebid.js/forks","keys_url":"https://api.github.com/repos/prebid/Prebid.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prebid/Prebid.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prebid/Prebid.js/teams","hooks_url":"https://api.github.com/repos/prebid/Prebid.js/hooks","issue_events_url":"https://api.github.com/repos/prebid/Prebid.js/issues/events{/number}","events_url":"https://api.github.com/repos/prebid/Prebid.js/events","assignees_url":"https://api.github.com/repos/prebid/Prebid.js/assignees{/user}","branches_url":"https://api.github.com/repos/prebid/Prebid.js/branches{/branch}","tags_url":"https://api.github.com/repos/prebid/Prebid.js/tags","blobs_url":"https://api.github.com/repos/prebid/Prebid.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prebid/Prebid.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prebid/Prebid.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/prebid/Prebid.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prebid/Prebid.js/statuses/{sha}","languages_url":"https://api.github.com/repos/prebid/Prebid.js/languages","stargazers_url":"https://api.github.com/repos/prebid/Prebid.js/stargazers","contributors_url":"https://api.github.com/repos/prebid/Prebid.js/contributors","subscribers_url":"https://api.github.com/repos/prebid/Prebid.js/subscribers","subscription_url":"https://api.github.com/repos/prebid/Prebid.js/subscription","commits_url":"https://api.github.com/repos/prebid/Prebid.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/prebid/Prebid.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/prebid/Prebid.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/prebid/Prebid.js/issues/comments{/number}","contents_url":"https://api.github.com/repos/prebid/Prebid.js/contents/{+path}","compare_url":"https://api.github.com/repos/prebid/Prebid.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prebid/Prebid.js/merges","archive_url":"https://api.github.com/repos/prebid/Prebid.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prebid/Prebid.js/downloads","issues_url":"https://api.github.com/repos/prebid/Prebid.js/issues{/number}","pulls_url":"https://api.github.com/repos/prebid/Prebid.js/pulls{/number}","milestones_url":"https://api.github.com/repos/prebid/Prebid.js/milestones{/number}","notifications_url":"https://api.github.com/repos/prebid/Prebid.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prebid/Prebid.js/labels{/name}","releases_url":"https://api.github.com/repos/prebid/Prebid.js/releases{/id}","deployments_url":"https://api.github.com/repos/prebid/Prebid.js/deployments","created_at":"2015-07-19T03:26:23Z","updated_at":"2017-06-17T20:03:18Z","pushed_at":"2017-06-19T14:00:03Z","git_url":"git://github.com/prebid/Prebid.js.git","ssh_url":"git@github.com:prebid/Prebid.js.git","clone_url":"https://github.com/prebid/Prebid.js.git","svn_url":"https://github.com/prebid/Prebid.js","homepage":"http://prebid.org","size":2529,"stargazers_count":476,"watchers_count":476,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":403,"mirror_url":null,"open_issues_count":84,"forks":403,"open_issues":84,"watchers":476,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177"},"html":{"href":"https://github.com/prebid/Prebid.js/pull/1177"},"issue":{"href":"https://api.github.com/repos/prebid/Prebid.js/issues/1177"},"comments":{"href":"https://api.github.com/repos/prebid/Prebid.js/issues/1177/comments"},"review_comments":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177/comments"},"review_comment":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prebid/Prebid.js/pulls/1177/commits"},"statuses":{"href":"https://api.github.com/repos/prebid/Prebid.js/statuses/80e395509fd2b5a5bfa401b559b805df0aafef99"}}}}
{"actor":{"display_login":"dbemiller"}}