Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@ngtools/webpack eagerly reloading everything inside of src folder for ng serve #6238

Closed
smithad15 opened this issue May 9, 2017 · 2 comments · Fixed by #7310
Closed

@ngtools/webpack eagerly reloading everything inside of src folder for ng serve #6238

smithad15 opened this issue May 9, 2017 · 2 comments · Fixed by #7310
Labels
effort1: easy (hours) help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix type: faq

Comments

@smithad15
Copy link

Bug Report or Feature Request (mark with an x)

- [ x ] bug report -> please search issues before submitting
- [ ] feature request

@ngtools/webpack is causing webpack-dev-server to eagerly rebuild for any change inside of the folder that contains the tsconfig file. This includes files that are not referenced by webpack at all. This can be a huge problem for development if your tsconfig.json file is in the root of your application folder as even git changes trigger a rebuild.

Versions.

@angular/cli: 1.0.2
node: 7.2.1
os: darwin x64
@angular/common: 4.1.1
@angular/compiler: 4.1.1
@angular/core: 4.1.1
@angular/forms: 4.1.1
@angular/http: 4.1.1
@angular/platform-browser: 4.1.1
@angular/platform-browser-dynamic: 4.1.1
@angular/router: 4.1.1
@angular/cli: 1.0.2
@angular/compiler-cli: 4.1.1

Repro steps.

Inside of Angular CLI
From a newly created project, start up the dev server and add an empty file in src without a file extension. The dev server will rebuild.

Inside of a custom project
If you are using @ngtools/webpack for your development build inside of a project with a custom webpack configuration (ejected projects also count), and your tsConfigPath references a tsconfig.json file in the root of the project, start up the dev server and stage a file in git. You will see the dev server rebuild.

The log given by the failure.

N/A

Desired functionality.

@ngtools/webpack should not be increasing the scope of watched files in the project beyond the boundaries of what has been configured inside of webpack itself. If the file is not in the bundle, it should not trigger a rebuild from webpack-dev-server.

Mention any other details that might be useful.

@filipesilva
Copy link
Contributor

Sounds like a bug alright.

This is probably also related to some instances of #1610 where IDE's 'safe-write' settings create temporary files. Knowing that rebuilds are triggered for all file changes really highlights @wulfsberg commment in #1610 (comment).

@filipesilva filipesilva added help wanted effort1: easy (hours) package4: @angular-sdk/webpack P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix labels May 10, 2017
@filipesilva filipesilva marked this as a duplicate of #6962 Jul 28, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Aug 9, 2017
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

Setting a resource doesn't actually seem to be necessary, I did a few local tests and lazy routes still seem to be added and updated correctly.

@Brocco this should also fix your local failing poll test.

Fix angular#6238
Close angular#6959
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Aug 10, 2017
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

This PR makes it always use the `src/$$_gendir/` special directory.

@Brocco this should also fix your local failing poll test.

Fix angular#6238
Close angular#6959
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Aug 10, 2017
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

This PR makes it always use the `src/$$_gendir/` special directory.

@Brocco this should also fix your local failing poll test.

Fix angular#6238
Close angular#6959
Brocco pushed a commit that referenced this issue Aug 17, 2017
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

This PR makes it always use the `src/$$_gendir/` special directory.

@Brocco this should also fix your local failing poll test.

Fix #6238
Close #6959
Brocco pushed a commit that referenced this issue Aug 17, 2017
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

This PR makes it always use the `src/$$_gendir/` special directory.

@Brocco this should also fix your local failing poll test.

Fix #6238
Close #6959
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
We add either `src/` or `src/$$_gendir/` directories as the lazy route resource, which causes rebuilds whenever anything changes there.

This PR makes it always use the `src/$$_gendir/` special directory.

@Brocco this should also fix your local failing poll test.

Fix angular#6238
Close angular#6959
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort1: easy (hours) help wanted P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent severity2: inconvenient type: bug/fix type: faq
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants