Title: SSR builder and externals dependencies (Angular 9) · Issue #16348 · angular/angular-cli · GitHub
Open Graph Title: SSR builder and externals dependencies (Angular 9) · Issue #16348 · angular/angular-cli
X Title: SSR builder and externals dependencies (Angular 9) · Issue #16348 · angular/angular-cli
Description: Bug Report In relation to the conversation with @manfredsteyer. What is the expected behavior? In some specific scenarios, I would like to bundle dependencies and minify the code of my Angular application, but at the same time leave my s...
Open Graph Description: Bug Report In relation to the conversation with @manfredsteyer. What is the expected behavior? In some specific scenarios, I would like to bundle dependencies and minify the code of my Angular appl...
X Description: Bug Report In relation to the conversation with @manfredsteyer. What is the expected behavior? In some specific scenarios, I would like to bundle dependencies and minify the code of my Angular appl...
Opengraph URL: https://github.com/angular/angular-cli/issues/16348
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SSR builder and externals dependencies (Angular 9)","articleBody":"# Bug Report\r\n\r\nIn relation to the conversation with @manfredsteyer.\r\n\r\n#### What is the expected behavior?\r\n\r\nIn some specific scenarios, I would like to bundle dependencies and minify the code of my Angular application, but at the same time leave my server-side code untouched (no dependencies bundled, no minification/obfuscation). This is important because:\r\n- sometimes you may not want to bundle all server dependencies (especially when you're building a full-stack app). For instance, you won’t be able to bundle `pg` (if you use postgres) as well as internal deps of `mongoose` (or `bcrypt`) because they use a native node.js binaries (C++ code)\r\n- sometimes you may not want to obfuscate class names, properties names, function names etc because there are important for libraries such as Typeorm (to automatically create columns with proper names in a database) or e.g. NestJS. Having full control over what can be optimized for server-side is quite important here\r\n\r\n#### What is the current behavior?\r\n\r\nWhen I try to set `bundleDependencies` to `none` under `server` configuration in `angular.json`, the application will stop working:\r\n\r\n\r\n\r\nBoth `serve:ssr` and `serve:ssr:dev` won't work.\r\n\r\nAlso, I'm not entirely sure how I can determine the behavior of webpack for the server part now. Previously, we had `webpack.server.config` in which we could simply use plugins like `nodeExternals` or set `optimization` to false (to avoid code minification). This is worth adding to the docs (how to accomplish this now with a new setup).\r\n\r\n#### What modules are related to this issue?\r\n```\r\n- [ ] aspnetcore-engine\r\n- [ ] common\r\n- [ ] express-engine\r\n- [ ] hapi-engine\r\n- [ ] module-map-ngfactory-loader\r\n```\r\n\r\n#### Minimal reproduction with instructions:\r\n\r\nNo reproduction needed - new Angular app with `ng add @nguniversal/express-engine@next` (or any other engine)\r\n\r\n#### What is the use-case or motivation for changing an existing behavior?\r\n\r\nMainly full-stack applications, compatibility with other Node.js platforms\r\n\r\n#### Environment:\r\n**@nguniversal versions**\r\n - aspnetcore-engine: \r\n - common:\r\n - express-engine: 9.0.0-next.7\r\n - hapi-engine:\r\n - module-map-ngfactory-loader:\r\n```\r\nAngular CLI: 9.0.0-rc.4\r\nNode: 12.13.0\r\nOS: darwin x64\r\n\r\nAngular: 9.0.0-rc.4\r\n```\r\n\r\n\r\n#### Is there anything else we should know?","author":{"url":"https://github.com/kamilmysliwiec","@type":"Person","name":"kamilmysliwiec"},"datePublished":"2019-12-03T16:04:05Z","url":"https://github.com/angular/angular-cli/issues/16348"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:d4c77c28-9dcb-20a9-3eed-468c2b6bb7b3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A036:213839:375FD1C:46C766E:6B01E446 |
| html-safe-nonce | 1016b1beba9cdccf87998eed4b8bf9aa30f6ea8329e1352889e9e4e011ff72db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMDM2OjIxMzgzOTozNzVGRDFDOjQ2Qzc2NkU6NkIwMUU0NDYiLCJ2aXNpdG9yX2lkIjoiNDUyODIyNTM3MzkxMzIxMTk3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2ffdcd075e3175eda22a5e4e5302d7f51c5ae16ac4ee3a4b49ce0fc8e1ccfa4d |
| hovercard-subject-tag | issue:532704525 |
| 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-cli/16348/issue_layout |
| twitter:image | https://opengraph.githubassets.com/195c5d57378acd3ba6d7dfb495ec0cde24f4ff0fa54d87a0b529333b74dbdaa2/angular/angular-cli/issues/16348 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/195c5d57378acd3ba6d7dfb495ec0cde24f4ff0fa54d87a0b529333b74dbdaa2/angular/angular-cli/issues/16348 |
| og:image:alt | Bug Report In relation to the conversation with @manfredsteyer. What is the expected behavior? In some specific scenarios, I would like to bundle dependencies and minify the code of my Angular appl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kamilmysliwiec |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width