Title: Replace System.register bundle with a CJS bundle · Issue #4278 · angular/angular · GitHub
Open Graph Title: Replace System.register bundle with a CJS bundle · Issue #4278 · angular/angular
X Title: Replace System.register bundle with a CJS bundle · Issue #4278 · angular/angular
Description: Most developer workflows are based around CJS (Browserify or WebPack) and not System.js. Since System.js can consume cjs bundles, I suggest we replace our System.register bundle with a CJS bundle. In this case, developers that use Browse...
Open Graph Description: Most developer workflows are based around CJS (Browserify or WebPack) and not System.js. Since System.js can consume cjs bundles, I suggest we replace our System.register bundle with a CJS bundle. ...
X Description: Most developer workflows are based around CJS (Browserify or WebPack) and not System.js. Since System.js can consume cjs bundles, I suggest we replace our System.register bundle with a CJS bundle. ...
Opengraph URL: https://github.com/angular/angular/issues/4278
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Replace System.register bundle with a CJS bundle","articleBody":"Most developer workflows are based around CJS (Browserify or WebPack) and not System.js. Since System.js can consume cjs bundles, I suggest we replace our System.register bundle with a CJS bundle. In this case, developers that use Browserify or WebPack will be able to use it, and it should still work with System.\n\nNotes:\n- System.register has a lot of overhead comparing to CJS. My naive measurements showed the difference is about 18%. \n- When using a CJS bundle, you cannot important submodudles, only \"angular2/angular2\". I think this is an advantage cause it prevents users from depending on private API.\n\nFinally, once we produce a CJS bundle, I think we should change our Getting Started guide to use WebPack instead of System.js. The reason is WebPack provides a lot better experience out of the box (including TypeScript and Babel). \n\nThe WebPack config for an Angular 2 project written with TypeScript is about 10 lines long:\n\n```\nmodule.exports = {\n resolve: {\n root: __dirname,\n extensions: ['.ts', '.js']\n },\n entry: [\"webpackapp\"],\n output: {filename: \"webappapp_bundle.js\"},\n externals: {'angular2/angular2': \"angular2\"},\n devtool: 'source-map',\n module: {\n loaders: [\n { test: /\\.ts$/, loader: 'ts-loader' }\n ]\n }\n}\n```\n\nYou get source maps, dev server with live reload, production/dev modes -- a very good first impression and a clear path to production setting.\n\n/cc @IgorMinar @mhevery @rkirov @jeffbcross \n","author":{"url":"https://github.com/vsavkin","@type":"Person","name":"vsavkin"},"datePublished":"2015-09-21T01:11:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":35},"url":"https://github.com/4278/angular/issues/4278"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6e97a066-647f-a4b2-9c77-4e8b93961e8d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8ED4:2125F7:28AF901:37C28B8:6A630504 |
| html-safe-nonce | 06b0ac2d826e215abf17d4cc996637117caaab56f48aada6fd49436d50606acc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUQ0OjIxMjVGNzoyOEFGOTAxOjM3QzI4Qjg6NkE2MzA1MDQiLCJ2aXNpdG9yX2lkIjoiMjA2OTk4MDA3OTA0OTI5MDI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7cfeda41268c6aa173297edee00f9bfd48dee068c718ce0865aad9b94b38384f |
| hovercard-subject-tag | issue:107428611 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/4278/issue_layout |
| twitter:image | https://opengraph.githubassets.com/46f002ba2b492aec0983a8e14a86eda541e7e605f614231656b6d7c7f4ca265f/angular/angular/issues/4278 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/46f002ba2b492aec0983a8e14a86eda541e7e605f614231656b6d7c7f4ca265f/angular/angular/issues/4278 |
| og:image:alt | Most developer workflows are based around CJS (Browserify or WebPack) and not System.js. Since System.js can consume cjs bundles, I suggest we replace our System.register bundle with a CJS bundle. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vsavkin |
| hostname | github.com |
| expected-hostname | github.com |
| None | b48e7bf0b1945d51f303503b057abf666ce74c3efbe107b413db2bb921c3f012 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9370f37042c29822d6ba7e3f670f0036a0155b21 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width