{"action":"created","comment":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/comments/222248178","pull_request_review_id":161084855,"id":222248178,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjI0ODE3OA==","diff_hunk":"@@ -0,0 +1,3 @@\n+module.exports = {\n+  typescript: false","path":"templates/demo/config/pipeline.js","position":2,"original_position":2,"commit_id":"a2930f6747682fe871842438b99881de675cba95","original_commit_id":"a2930f6747682fe871842438b99881de675cba95","user":{"login":"alaibe","id":491074,"node_id":"MDQ6VXNlcjQ5MTA3NA==","avatar_url":"https://avatars0.githubusercontent.com/u/491074?v=4","gravatar_id":"","url":"https://api.github.com/users/alaibe","html_url":"https://github.com/alaibe","followers_url":"https://api.github.com/users/alaibe/followers","following_url":"https://api.github.com/users/alaibe/following{/other_user}","gists_url":"https://api.github.com/users/alaibe/gists{/gist_id}","starred_url":"https://api.github.com/users/alaibe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaibe/subscriptions","organizations_url":"https://api.github.com/users/alaibe/orgs","repos_url":"https://api.github.com/users/alaibe/repos","events_url":"https://api.github.com/users/alaibe/events{/privacy}","received_events_url":"https://api.github.com/users/alaibe/received_events","type":"User","site_admin":false},"body":"same","created_at":"2018-10-03T09:48:33Z","updated_at":"2018-10-03T09:48:44Z","html_url":"https://github.com/embark-framework/embark/pull/960#discussion_r222248178","pull_request_url":"https://api.github.com/repos/embark-framework/embark/pulls/960","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments/222248178"},"html":{"href":"https://github.com/embark-framework/embark/pull/960#discussion_r222248178"},"pull_request":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/960"}}},"pull_request":{"url":"https://api.github.com/repos/embark-framework/embark/pulls/960","id":219889994,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5ODg5OTk0","html_url":"https://github.com/embark-framework/embark/pull/960","diff_url":"https://github.com/embark-framework/embark/pull/960.diff","patch_url":"https://github.com/embark-framework/embark/pull/960.patch","issue_url":"https://api.github.com/repos/embark-framework/embark/issues/960","number":960,"state":"open","locked":false,"title":"enhance webpack","user":{"login":"michaelsbradleyjr","id":194260,"node_id":"MDQ6VXNlcjE5NDI2MA==","avatar_url":"https://avatars0.githubusercontent.com/u/194260?v=4","gravatar_id":"","url":"https://api.github.com/users/michaelsbradleyjr","html_url":"https://github.com/michaelsbradleyjr","followers_url":"https://api.github.com/users/michaelsbradleyjr/followers","following_url":"https://api.github.com/users/michaelsbradleyjr/following{/other_user}","gists_url":"https://api.github.com/users/michaelsbradleyjr/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsbradleyjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsbradleyjr/subscriptions","organizations_url":"https://api.github.com/users/michaelsbradleyjr/orgs","repos_url":"https://api.github.com/users/michaelsbradleyjr/repos","events_url":"https://api.github.com/users/michaelsbradleyjr/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsbradleyjr/received_events","type":"User","site_admin":false},"body":"## Overview\r\n**TL;DR**\r\n\r\nWith this PR, Embark's default webpack config provides the same babel plugins/presets as [babel-preset-react-app](https://github.com/facebook/create-react-app/tree/master/packages/babel-preset-react-app) which is part of the [create-react-app](https://github.com/facebook/create-react-app) project.\r\n\r\nAll of the plugins, except for `@babel/plugin-transform-flow-strip-types`, have been verified as working on the [features/enhanced-webpack](https://github.com/embark-framework/embark-typescript-template/compare/features/enhanced-webpack) branch of `embark-typescript-template`. If this PR is merged, I can make a PR for that template branch right away. Or, it may be better to remove the babel-demos and put them in a test app inside embark — I'm open to suggestions.  Another template repo needs to be setup (`embark-flow-template`) that will have almost exactly the same code, but using Flow for type checking instead of TypeScript.\r\n\r\n### Notes\r\n\r\nVarious babel-related dependencies that we already use have been bumped to the latest versions. It was not possible to bump to the latest webpack as there's presently an incompatibility with `hard-source-webpack-plugin`. Once the maintainers of the plugin have caught up with webpack's changes, we can upgrade webpack.\r\n\r\nWith respect to babel plugins and presets, embark is now nearly identical to create-react-app. The one exception is that I didn't make use of `babel-plugin-transform-dynamic-import` since it doesn't seem to have a use case, at present, re: how `embark test` works.\r\n\r\n`embark eject-webpack` now emits two files into a DApp's top-level directory, since a separate script is needed to customize the behavior of `babel-loader`.\r\n\r\n🎉🎉🎉 &nbsp; It's possible to easily toggle TypeScript support through a DApp's `config/pipeline.js`, introduced by this PR. In other words, it's no longer necessary to eject the webpack config to enable TypeScript support. Once the pipeline has been converted to a proper embark module, handling of the config can be done in the same manner as for other modules' configs.\r\n\r\nPrior to this PR, `.scss` files were being run through the `css-loader` but what's needed for those is the `sass-loader`, which has been added.\r\n\r\nThis PR got bogged down a bit by the amount of time it took to experiment with all the new features and implement the demos on [the template branch](https://github.com/embark-framework/embark-typescript-template/compare/features/enhanced-webpack).\r\n\r\nIn particular:\r\n\r\nThere's some buggy behavior in webpack 4 re: dynamic `import()`. Dynamic import is a fantastic feature and I think it has a lot to offer us and DApp developers — not all parts of a DApp or even embark may need to be loaded all at once, so it opens up a lot of possibilities for decreasing initial load times of complex DApps. In any case, it took me awhile to figure out that I was dealing with a webpack bug and not a configuration problem.\r\n\r\n[babel-plugin-console](https://github.com/mattphillips/babel-plugin-console) is given as a primary example of [babel-plugin-macros](https://github.com/kentcdodds/babel-plugin-macros), but it seems to be broken. It took a little while, again, to figure out there's a problem with `babel-plugin-console/scope.macro` and not in my usage of it or configuration of webpack/babel. Utlimately, I implemented a demo using a different macro.\r\n\r\n### Cool Spaceship Picture\r\n\r\n![](https://i.ytimg.com/vi/inurWYha0Mw/maxresdefault.jpg)\r\n","created_at":"2018-10-03T01:19:08Z","updated_at":"2018-10-03T09:48:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82afc653d3ec85c8a202d0896ccae600055d3b6b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/embark-framework/embark/pulls/960/commits","review_comments_url":"https://api.github.com/repos/embark-framework/embark/pulls/960/comments","review_comment_url":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/embark-framework/embark/issues/960/comments","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/a2930f6747682fe871842438b99881de675cba95","head":{"label":"embark-framework:features/enhance-webpack","ref":"features/enhance-webpack","sha":"a2930f6747682fe871842438b99881de675cba95","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","private":false,"owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-10-02T22:42:48Z","pushed_at":"2018-10-03T02:04:12Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":12578,"stargazers_count":2415,"watchers_count":2415,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":352,"open_issues":61,"watchers":2415,"default_branch":"develop"}},"base":{"label":"embark-framework:develop","ref":"develop","sha":"de93a56e9f65d3b7765dc3bb4aa820482abf0001","user":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"repo":{"id":36172821,"node_id":"MDEwOlJlcG9zaXRvcnkzNjE3MjgyMQ==","name":"embark","full_name":"embark-framework/embark","private":false,"owner":{"login":"embark-framework","id":12584440,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTg0NDQw","avatar_url":"https://avatars1.githubusercontent.com/u/12584440?v=4","gravatar_id":"","url":"https://api.github.com/users/embark-framework","html_url":"https://github.com/embark-framework","followers_url":"https://api.github.com/users/embark-framework/followers","following_url":"https://api.github.com/users/embark-framework/following{/other_user}","gists_url":"https://api.github.com/users/embark-framework/gists{/gist_id}","starred_url":"https://api.github.com/users/embark-framework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embark-framework/subscriptions","organizations_url":"https://api.github.com/users/embark-framework/orgs","repos_url":"https://api.github.com/users/embark-framework/repos","events_url":"https://api.github.com/users/embark-framework/events{/privacy}","received_events_url":"https://api.github.com/users/embark-framework/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/embark-framework/embark","description":"Framework for serverless Decentralized Applications using Ethereum, IPFS and other platforms","fork":false,"url":"https://api.github.com/repos/embark-framework/embark","forks_url":"https://api.github.com/repos/embark-framework/embark/forks","keys_url":"https://api.github.com/repos/embark-framework/embark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/embark-framework/embark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/embark-framework/embark/teams","hooks_url":"https://api.github.com/repos/embark-framework/embark/hooks","issue_events_url":"https://api.github.com/repos/embark-framework/embark/issues/events{/number}","events_url":"https://api.github.com/repos/embark-framework/embark/events","assignees_url":"https://api.github.com/repos/embark-framework/embark/assignees{/user}","branches_url":"https://api.github.com/repos/embark-framework/embark/branches{/branch}","tags_url":"https://api.github.com/repos/embark-framework/embark/tags","blobs_url":"https://api.github.com/repos/embark-framework/embark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/embark-framework/embark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/embark-framework/embark/git/refs{/sha}","trees_url":"https://api.github.com/repos/embark-framework/embark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/embark-framework/embark/statuses/{sha}","languages_url":"https://api.github.com/repos/embark-framework/embark/languages","stargazers_url":"https://api.github.com/repos/embark-framework/embark/stargazers","contributors_url":"https://api.github.com/repos/embark-framework/embark/contributors","subscribers_url":"https://api.github.com/repos/embark-framework/embark/subscribers","subscription_url":"https://api.github.com/repos/embark-framework/embark/subscription","commits_url":"https://api.github.com/repos/embark-framework/embark/commits{/sha}","git_commits_url":"https://api.github.com/repos/embark-framework/embark/git/commits{/sha}","comments_url":"https://api.github.com/repos/embark-framework/embark/comments{/number}","issue_comment_url":"https://api.github.com/repos/embark-framework/embark/issues/comments{/number}","contents_url":"https://api.github.com/repos/embark-framework/embark/contents/{+path}","compare_url":"https://api.github.com/repos/embark-framework/embark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/embark-framework/embark/merges","archive_url":"https://api.github.com/repos/embark-framework/embark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/embark-framework/embark/downloads","issues_url":"https://api.github.com/repos/embark-framework/embark/issues{/number}","pulls_url":"https://api.github.com/repos/embark-framework/embark/pulls{/number}","milestones_url":"https://api.github.com/repos/embark-framework/embark/milestones{/number}","notifications_url":"https://api.github.com/repos/embark-framework/embark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/embark-framework/embark/labels{/name}","releases_url":"https://api.github.com/repos/embark-framework/embark/releases{/id}","deployments_url":"https://api.github.com/repos/embark-framework/embark/deployments","created_at":"2015-05-24T13:10:10Z","updated_at":"2018-10-02T22:42:48Z","pushed_at":"2018-10-03T02:04:12Z","git_url":"git://github.com/embark-framework/embark.git","ssh_url":"git@github.com:embark-framework/embark.git","clone_url":"https://github.com/embark-framework/embark.git","svn_url":"https://github.com/embark-framework/embark","homepage":"https://embark.status.im/","size":12578,"stargazers_count":2415,"watchers_count":2415,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":352,"mirror_url":null,"archived":false,"open_issues_count":61,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":352,"open_issues":61,"watchers":2415,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/960"},"html":{"href":"https://github.com/embark-framework/embark/pull/960"},"issue":{"href":"https://api.github.com/repos/embark-framework/embark/issues/960"},"comments":{"href":"https://api.github.com/repos/embark-framework/embark/issues/960/comments"},"review_comments":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/960/comments"},"review_comment":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/embark-framework/embark/pulls/960/commits"},"statuses":{"href":"https://api.github.com/repos/embark-framework/embark/statuses/a2930f6747682fe871842438b99881de675cba95"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"alaibe"}}