{"action":"created","comment":{"url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/comments/83527675","pull_request_review_id":4368603,"id":83527675,"diff_hunk":"@@ -1,6 +1,163 @@\n ---\n title: Loaders\n sort: 2\n+contributors:\n+  - manekinekko\n ---\n-> module.loaders configuration option\n-> test, include, exclude, loader, query\n+\n+## What are loaders?\n+\n+Loaders are transformations that are applied on a resource file of your app. They are functions (running in node.js) that take the source of a resource file as the parameter and return the new source.\n+\n+For example, you can use loaders to tell webpack to load TypeScript or JSX.\n+\n+### Loader features\n+\n+* Loaders can be chained. They are applied in a pipeline to the resource. The final loader is expected to return JavaScript; each other loader can return source in arbitrary format, which is passed to the next loader.\n+* Loaders can be synchronous or asynchronous.\n+* Loaders run in Node.js and can do everything that's possible there.\n+* Loaders accept query parameters. This can be used to pass configuration to the loader.\n+* Loaders can be bound to extensions / RegExps in the configuration.\n+* Loaders can be published / installed through `npm`.\n+* Normal modules can export a loader in addition to the normal `main` via `package.json` `loader`.\n+* Loaders can access the configuration.\n+* Plugins can give loaders more features.\n+* Loaders can emit additional arbitrary files.\n+* etc.\n+\n+If you are interested in some loader examples head off to the [[list of loaders]].\n+\n+## Resolving loaders\n+\n+Loaders are [[resolved similar to modules | resolving]]. A loader module is expected to export a function and to be written in node.js compatible JavaScript. In the common case you manage loaders with npm, but you can also have loaders as files in your app.","path":"content/concepts/loaders.md","position":34,"original_position":34,"commit_id":"487b245a86237fadd548461ee65d25f2c71b809e","original_commit_id":"487b245a86237fadd548461ee65d25f2c71b809e","user":{"login":"bebraw","id":166921,"avatar_url":"https://avatars.githubusercontent.com/u/166921?v=3","gravatar_id":"","url":"https://api.github.com/users/bebraw","html_url":"https://github.com/bebraw","followers_url":"https://api.github.com/users/bebraw/followers","following_url":"https://api.github.com/users/bebraw/following{/other_user}","gists_url":"https://api.github.com/users/bebraw/gists{/gist_id}","starred_url":"https://api.github.com/users/bebraw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bebraw/subscriptions","organizations_url":"https://api.github.com/users/bebraw/orgs","repos_url":"https://api.github.com/users/bebraw/repos","events_url":"https://api.github.com/users/bebraw/events{/privacy}","received_events_url":"https://api.github.com/users/bebraw/received_events","type":"User","site_admin":false},"body":"/s/node.js/Node.js","created_at":"2016-10-15T07:43:34Z","updated_at":"2016-10-15T07:43:34Z","html_url":"https://github.com/webpack/webpack.js.org/pull/249#discussion_r83527675","pull_request_url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249","_links":{"self":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/comments/83527675"},"html":{"href":"https://github.com/webpack/webpack.js.org/pull/249#discussion_r83527675"},"pull_request":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249"}}},"pull_request":{"url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249","id":89465191,"html_url":"https://github.com/webpack/webpack.js.org/pull/249","diff_url":"https://github.com/webpack/webpack.js.org/pull/249.diff","patch_url":"https://github.com/webpack/webpack.js.org/pull/249.patch","issue_url":"https://api.github.com/repos/webpack/webpack.js.org/issues/249","number":249,"state":"open","locked":false,"title":"feat(loaders): add loaders content","user":{"login":"manekinekko","id":1699357,"avatar_url":"https://avatars.githubusercontent.com/u/1699357?v=3","gravatar_id":"","url":"https://api.github.com/users/manekinekko","html_url":"https://github.com/manekinekko","followers_url":"https://api.github.com/users/manekinekko/followers","following_url":"https://api.github.com/users/manekinekko/following{/other_user}","gists_url":"https://api.github.com/users/manekinekko/gists{/gist_id}","starred_url":"https://api.github.com/users/manekinekko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manekinekko/subscriptions","organizations_url":"https://api.github.com/users/manekinekko/orgs","repos_url":"https://api.github.com/users/manekinekko/repos","events_url":"https://api.github.com/users/manekinekko/events{/privacy}","received_events_url":"https://api.github.com/users/manekinekko/received_events","type":"User","site_admin":false},"body":"Add initial content for loaders. Mainly copied and adapted from https://webpack.github.io/docs/using-loaders.html","created_at":"2016-10-14T22:32:16Z","updated_at":"2016-10-15T07:47:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"08f2c660d56806f2cd0d415c6e77f078bdbfbb07","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249/commits","review_comments_url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249/comments","review_comment_url":"https://api.github.com/repos/webpack/webpack.js.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/webpack/webpack.js.org/issues/249/comments","statuses_url":"https://api.github.com/repos/webpack/webpack.js.org/statuses/487b245a86237fadd548461ee65d25f2c71b809e","head":{"label":"manekinekko:pr-loaders","ref":"pr-loaders","sha":"487b245a86237fadd548461ee65d25f2c71b809e","user":{"login":"manekinekko","id":1699357,"avatar_url":"https://avatars.githubusercontent.com/u/1699357?v=3","gravatar_id":"","url":"https://api.github.com/users/manekinekko","html_url":"https://github.com/manekinekko","followers_url":"https://api.github.com/users/manekinekko/followers","following_url":"https://api.github.com/users/manekinekko/following{/other_user}","gists_url":"https://api.github.com/users/manekinekko/gists{/gist_id}","starred_url":"https://api.github.com/users/manekinekko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manekinekko/subscriptions","organizations_url":"https://api.github.com/users/manekinekko/orgs","repos_url":"https://api.github.com/users/manekinekko/repos","events_url":"https://api.github.com/users/manekinekko/events{/privacy}","received_events_url":"https://api.github.com/users/manekinekko/received_events","type":"User","site_admin":false},"repo":{"id":70949796,"name":"webpack.js.org","full_name":"manekinekko/webpack.js.org","owner":{"login":"manekinekko","id":1699357,"avatar_url":"https://avatars.githubusercontent.com/u/1699357?v=3","gravatar_id":"","url":"https://api.github.com/users/manekinekko","html_url":"https://github.com/manekinekko","followers_url":"https://api.github.com/users/manekinekko/followers","following_url":"https://api.github.com/users/manekinekko/following{/other_user}","gists_url":"https://api.github.com/users/manekinekko/gists{/gist_id}","starred_url":"https://api.github.com/users/manekinekko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manekinekko/subscriptions","organizations_url":"https://api.github.com/users/manekinekko/orgs","repos_url":"https://api.github.com/users/manekinekko/repos","events_url":"https://api.github.com/users/manekinekko/events{/privacy}","received_events_url":"https://api.github.com/users/manekinekko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manekinekko/webpack.js.org","description":"New repository for webpack documentation and more!","fork":true,"url":"https://api.github.com/repos/manekinekko/webpack.js.org","forks_url":"https://api.github.com/repos/manekinekko/webpack.js.org/forks","keys_url":"https://api.github.com/repos/manekinekko/webpack.js.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manekinekko/webpack.js.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manekinekko/webpack.js.org/teams","hooks_url":"https://api.github.com/repos/manekinekko/webpack.js.org/hooks","issue_events_url":"https://api.github.com/repos/manekinekko/webpack.js.org/issues/events{/number}","events_url":"https://api.github.com/repos/manekinekko/webpack.js.org/events","assignees_url":"https://api.github.com/repos/manekinekko/webpack.js.org/assignees{/user}","branches_url":"https://api.github.com/repos/manekinekko/webpack.js.org/branches{/branch}","tags_url":"https://api.github.com/repos/manekinekko/webpack.js.org/tags","blobs_url":"https://api.github.com/repos/manekinekko/webpack.js.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manekinekko/webpack.js.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manekinekko/webpack.js.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/manekinekko/webpack.js.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manekinekko/webpack.js.org/statuses/{sha}","languages_url":"https://api.github.com/repos/manekinekko/webpack.js.org/languages","stargazers_url":"https://api.github.com/repos/manekinekko/webpack.js.org/stargazers","contributors_url":"https://api.github.com/repos/manekinekko/webpack.js.org/contributors","subscribers_url":"https://api.github.com/repos/manekinekko/webpack.js.org/subscribers","subscription_url":"https://api.github.com/repos/manekinekko/webpack.js.org/subscription","commits_url":"https://api.github.com/repos/manekinekko/webpack.js.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/manekinekko/webpack.js.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/manekinekko/webpack.js.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/manekinekko/webpack.js.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/manekinekko/webpack.js.org/contents/{+path}","compare_url":"https://api.github.com/repos/manekinekko/webpack.js.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manekinekko/webpack.js.org/merges","archive_url":"https://api.github.com/repos/manekinekko/webpack.js.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manekinekko/webpack.js.org/downloads","issues_url":"https://api.github.com/repos/manekinekko/webpack.js.org/issues{/number}","pulls_url":"https://api.github.com/repos/manekinekko/webpack.js.org/pulls{/number}","milestones_url":"https://api.github.com/repos/manekinekko/webpack.js.org/milestones{/number}","notifications_url":"https://api.github.com/repos/manekinekko/webpack.js.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manekinekko/webpack.js.org/labels{/name}","releases_url":"https://api.github.com/repos/manekinekko/webpack.js.org/releases{/id}","deployments_url":"https://api.github.com/repos/manekinekko/webpack.js.org/deployments","created_at":"2016-10-14T21:53:01Z","updated_at":"2016-10-14T21:53:02Z","pushed_at":"2016-10-14T22:31:02Z","git_url":"git://github.com/manekinekko/webpack.js.org.git","ssh_url":"git@github.com:manekinekko/webpack.js.org.git","clone_url":"https://github.com/manekinekko/webpack.js.org.git","svn_url":"https://github.com/manekinekko/webpack.js.org","homepage":"https://webpack.js.org","size":1667,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"webpack:develop","ref":"develop","sha":"06489e4ae31ff2ce2cfd4a441124c966e95013d1","user":{"login":"webpack","id":2105791,"avatar_url":"https://avatars.githubusercontent.com/u/2105791?v=3","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"repo":{"id":61886109,"name":"webpack.js.org","full_name":"webpack/webpack.js.org","owner":{"login":"webpack","id":2105791,"avatar_url":"https://avatars.githubusercontent.com/u/2105791?v=3","gravatar_id":"","url":"https://api.github.com/users/webpack","html_url":"https://github.com/webpack","followers_url":"https://api.github.com/users/webpack/followers","following_url":"https://api.github.com/users/webpack/following{/other_user}","gists_url":"https://api.github.com/users/webpack/gists{/gist_id}","starred_url":"https://api.github.com/users/webpack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/webpack/subscriptions","organizations_url":"https://api.github.com/users/webpack/orgs","repos_url":"https://api.github.com/users/webpack/repos","events_url":"https://api.github.com/users/webpack/events{/privacy}","received_events_url":"https://api.github.com/users/webpack/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/webpack/webpack.js.org","description":"New repository for webpack documentation and more!","fork":false,"url":"https://api.github.com/repos/webpack/webpack.js.org","forks_url":"https://api.github.com/repos/webpack/webpack.js.org/forks","keys_url":"https://api.github.com/repos/webpack/webpack.js.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/webpack/webpack.js.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/webpack/webpack.js.org/teams","hooks_url":"https://api.github.com/repos/webpack/webpack.js.org/hooks","issue_events_url":"https://api.github.com/repos/webpack/webpack.js.org/issues/events{/number}","events_url":"https://api.github.com/repos/webpack/webpack.js.org/events","assignees_url":"https://api.github.com/repos/webpack/webpack.js.org/assignees{/user}","branches_url":"https://api.github.com/repos/webpack/webpack.js.org/branches{/branch}","tags_url":"https://api.github.com/repos/webpack/webpack.js.org/tags","blobs_url":"https://api.github.com/repos/webpack/webpack.js.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/webpack/webpack.js.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/webpack/webpack.js.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/webpack/webpack.js.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/webpack/webpack.js.org/statuses/{sha}","languages_url":"https://api.github.com/repos/webpack/webpack.js.org/languages","stargazers_url":"https://api.github.com/repos/webpack/webpack.js.org/stargazers","contributors_url":"https://api.github.com/repos/webpack/webpack.js.org/contributors","subscribers_url":"https://api.github.com/repos/webpack/webpack.js.org/subscribers","subscription_url":"https://api.github.com/repos/webpack/webpack.js.org/subscription","commits_url":"https://api.github.com/repos/webpack/webpack.js.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/webpack/webpack.js.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/webpack/webpack.js.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/webpack/webpack.js.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/webpack/webpack.js.org/contents/{+path}","compare_url":"https://api.github.com/repos/webpack/webpack.js.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/webpack/webpack.js.org/merges","archive_url":"https://api.github.com/repos/webpack/webpack.js.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/webpack/webpack.js.org/downloads","issues_url":"https://api.github.com/repos/webpack/webpack.js.org/issues{/number}","pulls_url":"https://api.github.com/repos/webpack/webpack.js.org/pulls{/number}","milestones_url":"https://api.github.com/repos/webpack/webpack.js.org/milestones{/number}","notifications_url":"https://api.github.com/repos/webpack/webpack.js.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/webpack/webpack.js.org/labels{/name}","releases_url":"https://api.github.com/repos/webpack/webpack.js.org/releases{/id}","deployments_url":"https://api.github.com/repos/webpack/webpack.js.org/deployments","created_at":"2016-06-24T13:22:52Z","updated_at":"2016-10-13T09:54:39Z","pushed_at":"2016-10-15T06:53:22Z","git_url":"git://github.com/webpack/webpack.js.org.git","ssh_url":"git@github.com:webpack/webpack.js.org.git","clone_url":"https://github.com/webpack/webpack.js.org.git","svn_url":"https://github.com/webpack/webpack.js.org","homepage":"https://webpack.js.org","size":1775,"stargazers_count":184,"watchers_count":184,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":52,"mirror_url":null,"open_issues_count":90,"forks":52,"open_issues":90,"watchers":184,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249"},"html":{"href":"https://github.com/webpack/webpack.js.org/pull/249"},"issue":{"href":"https://api.github.com/repos/webpack/webpack.js.org/issues/249"},"comments":{"href":"https://api.github.com/repos/webpack/webpack.js.org/issues/249/comments"},"review_comments":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249/comments"},"review_comment":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/webpack/webpack.js.org/pulls/249/commits"},"statuses":{"href":"https://api.github.com/repos/webpack/webpack.js.org/statuses/487b245a86237fadd548461ee65d25f2c71b809e"}}}}
{"actor":{"display_login":"bebraw"}}