-
Notifications
You must be signed in to change notification settings - Fork 12k
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
Feature: Exclude files from 'watch' mode #2425
Comments
Currently Webpack builds the entire project on any change, so excluding a file from being watched isn't going to do much yet. There are plans to allow partial building of projects for this sort of case, but based on responses from the Angular CLI team we should expect them after the new year begins. |
It definitely shouldn't be compiled twice, that sounds like a bug. I tried to repro that on latest master and didn't get a double compile, so it might be fixed now. Regarding watch exclusing... I don't think we're adding that anytime soon. The way webpack works, it watches every dependency of the app plus the stuff we tell it to watch (styles, scripts, assets). If you don't want any of those to be watched, you can just remove it from |
The entire root folder is watched. Repro:
I have my scss files inside this source folder, but these are compiled externaly. So every time I save, the app is refreshed but without the latest build from sass. I believe this is a bug, given that the scope of watched files is wider than expected. |
In my case it´s with pug files. I´m compiling them with gulp and expected only the generated html to trigger compilation or at least a way to exclude .pug from watch. I have them at the same folder where the html is generated. |
@spredemann Did you ever figure out a solution... I am using pug with Angular 4, and using a gulp task to compile pug to html.. problem is ng-build see's the pug changes and recompiles. Wasn't a big deal until I started using |
@samartoli no but you probably should avoid includes anyway. Write smaller components. |
Emacs creates a file called |
The way I see it, everything is watched. Every time I upload a file ng rebuilds. Changing root in angular-cli.json does not help. I guess I have to move public folder outside of root directory. |
yeah, how do I get it not to watch vim files? It's very very annoying |
Reopening, I can confirm that everything in |
I believe everything in project directory is watched (where angular-cli.json is located) not only in src/. I have app root set to "src" in angular-cli.json, but still ng recompiles when any of my project files is saved. |
Is this being worked on? I am just like @edoloughlin using Emacs and right now I get this every time I edit a scss file and saving it before it finishes compiling:
|
Same issue as #4593 |
I'm looking into a fix for this. I'm thinking it would be an option passed in, similar to If I Any ideas what could be going wrong here? |
I take some of it back...it is working when I do the steps recommended in
|
Closed via #7310, |
For library generated with cli it seems to be watching entire library folder. @filipesilva I assume that currently it's not possible to add exception for library? |
I don't have this anular-cli.json file that has been mentioned. Using angular 7.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I think it would be great if you can exclude files to not watch so that it doesn't recompile every time. As of now, I'm using styles.scss to override the default styles.css. Yes, I do know that component can include the scss but I rather just have 1 style file for entire application (it's very small app). Anyways, everytime I change scss files then it gets compiled twice. Thanks and definitely loving NG2.
The text was updated successfully, but these errors were encountered: