Title: `scripts.bundle.js` not rebuilding when file included in `scripts` changes · Issue #7828 · angular/angular-cli · GitHub
Open Graph Title: `scripts.bundle.js` not rebuilding when file included in `scripts` changes · Issue #7828 · angular/angular-cli
X Title: `scripts.bundle.js` not rebuilding when file included in `scripts` changes · Issue #7828 · angular/angular-cli
Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting Versions. @angular/cli: 1.4.3 node: 6.7.0 os: darwin x64 @angular/animations: 4.4.3 @angular/common: 4.4.3 @angular/compiler: 4.4.3...
Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting Versions. @angular/cli: 1.4.3 node: 6.7.0 os: darwin x64 @angular/animations: 4.4.3 @angula...
X Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting Versions. @angular/cli: 1.4.3 node: 6.7.0 os: darwin x64 @angular/animations: 4.4.3 @ang...
Opengraph URL: https://github.com/angular/angular-cli/issues/7828
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`scripts.bundle.js` not rebuilding when file included in `scripts` changes","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n```\r\n\r\n### Versions.\r\n@angular/cli: 1.4.3\r\nnode: 6.7.0\r\nos: darwin x64\r\n@angular/animations: 4.4.3\r\n@angular/common: 4.4.3\r\n@angular/compiler: 4.4.3\r\n@angular/core: 4.4.3\r\n@angular/forms: 4.4.3\r\n@angular/http: 4.4.3\r\n@angular/platform-browser: 4.4.3\r\n@angular/platform-browser-dynamic: 4.4.3\r\n@angular/router: 4.4.3\r\n@angular/cli: 1.4.3\r\n@angular/compiler-cli: 4.4.3\r\n@angular/language-service: 4.4.3\r\ntypescript: 2.3.4\r\n### Repro steps.\r\n`ng new scriptsTest`\r\n`cd scriptsTest`\r\n`echo \"console.log('hello')\" > ./src/update.js`\r\n\r\nUpdate .angular-cli.json to include `update.js` in scripts, e.g.\r\n\r\n```\r\n{\r\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\r\n \"project\": {\r\n \"name\": \"scripts-test\"\r\n },\r\n \"apps\": [\r\n {\r\n \"root\": \"src\",\r\n \"outDir\": \"dist\",\r\n \"assets\": [\r\n \"assets\",\r\n \"favicon.ico\"\r\n ],\r\n \"index\": \"index.html\",\r\n \"main\": \"main.ts\",\r\n \"polyfills\": \"polyfills.ts\",\r\n \"test\": \"test.ts\",\r\n \"tsconfig\": \"tsconfig.app.json\",\r\n \"testTsconfig\": \"tsconfig.spec.json\",\r\n \"prefix\": \"app\",\r\n \"styles\": [\r\n \"styles.css\"\r\n ],\r\n \"scripts\": [\"update.js\"],\r\n \"environmentSource\": \"environments/environment.ts\",\r\n \"environments\": {\r\n \"dev\": \"environments/environment.ts\",\r\n \"prod\": \"environments/environment.prod.ts\"\r\n }\r\n }\r\n ],\r\n \"e2e\": {\r\n \"protractor\": {\r\n \"config\": \"./protractor.conf.js\"\r\n }\r\n },\r\n \"lint\": [\r\n {\r\n \"project\": \"src/tsconfig.app.json\",\r\n \"exclude\": \"**/node_modules/**\"\r\n },\r\n {\r\n \"project\": \"src/tsconfig.spec.json\",\r\n \"exclude\": \"**/node_modules/**\"\r\n },\r\n {\r\n \"project\": \"e2e/tsconfig.e2e.json\",\r\n \"exclude\": \"**/node_modules/**\"\r\n }\r\n ],\r\n \"test\": {\r\n \"karma\": {\r\n \"config\": \"./karma.conf.js\"\r\n }\r\n },\r\n \"defaults\": {\r\n \"styleExt\": \"css\",\r\n \"component\": {}\r\n }\r\n}\r\n```\r\n\r\nRun `ng serve` and open the webpage.\r\n\r\nYou will see `hello` logged to the console.\r\n\r\nNow edit the `src/update.js` file, change it to console.log('hello world');\r\n\r\nWebpack will trigger a rebuild of all the other bundles, but scripts bundle will stay the same. The page will reload, and the console will log `hello` again, instead of `hello world`.\r\n\r\nRestarting the build completely is the only way to get the change.\r\n\r\n### Desired functionality.\r\nWe'd like to see the external script changes trigger an update to the scripts.bundle.js. We're using `scripts` to include our ng1 bundle, and our changes to that bundle are not getting built.\r\n\r\n### Mention any other details that might be useful.\r\nThis might be related to this commit: https://github.com/angular/angular-cli/commit/e8f27f0","author":{"url":"https://github.com/DaftMonk","@type":"Person","name":"DaftMonk"},"datePublished":"2017-09-25T20:58:44Z","url":"https://github.com/angular/angular-cli/issues/7828"}
| 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:96d7bf80-6706-8b3d-dc63-494480530f51 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF26:2739CD:1C86512:2690720:6B055823 |
| html-safe-nonce | 0494e0c732d02a7b0fd9a5f616512ae839c51cae0e8f72b6b52a7f47024a08cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjI2OjI3MzlDRDoxQzg2NTEyOjI2OTA3MjA6NkIwNTU4MjMiLCJ2aXNpdG9yX2lkIjoiMzM2MjQzNDgwMjk2MzAxMTYxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 46bb5c04b69c5d503c99002fee9333de051f15ede83df92e5fe2a5ad8513b7ec |
| hovercard-subject-tag | issue:260413019 |
| 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/7828/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4136e0b44797cf4e4c21775ec999f77743b513e7b030384a40800f6f9b957c2/angular/angular-cli/issues/7828 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4136e0b44797cf4e4c21775ec999f77743b513e7b030384a40800f6f9b957c2/angular/angular-cli/issues/7828 |
| og:image:alt | Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting Versions. @angular/cli: 1.4.3 node: 6.7.0 os: darwin x64 @angular/animations: 4.4.3 @angula... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DaftMonk |
| hostname | github.com |
| expected-hostname | github.com |
| None | a79a02b7e7546ea306864e922ed2103ef4c04fac63168e11c2b2d4d816793080 |
| 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 | 10dff83edfd4f3617a7792a152d44991587b434c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width