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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng build my-lib --watch does not watch assets #17778

Closed
siegklenes opened this issue May 21, 2020 · 4 comments
Closed

ng build my-lib --watch does not watch assets #17778

siegklenes opened this issue May 21, 2020 · 4 comments

Comments

@siegklenes
Copy link

馃悶 bug report

Affected Package

Not sure, @angular/compiler

Is this a regression?

No, it's a bug in recent feature

Description

After generate a library project, adding

"assets": [
    "./assets/**/*.*"
  ],

in ng-package.json , the assets is not copied again to dist folder when --watch flag is on.
Problably, the Copying assets step needs to be reevaluated.

馃敩 Minimal Reproduction

1- ng new test-project
2 - cd test-project
3 - ng g library one-lib
4 - edit ng-package.json, adding the assets property, declared before in the issue.
5 - create a folder in projects/one-lib/assets
6 - create a file inside that folder, file.json, and write a content in it
7 - ng build one-lib --watch
8 - in dist folder, should be created the assets folder and the file.json
9 - change the content in file.json inside project folder. With watch flag, the file should be recopied to dist folder.

馃敟 Exception or Error

The file is not updated with watch flag.

In our private project, the automatic copy of file is essential

馃實 Your Environment

Angular Version:


Angular CLI: 9.1.6
Node: 10.16.3
OS: linux x64

Angular: 9.1.9
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.901.6
@angular-devkit/build-angular      0.901.6
@angular-devkit/build-ng-packagr   0.901.6
@angular-devkit/build-optimizer    0.901.6
@angular-devkit/build-webpack      0.901.6
@angular-devkit/core               9.1.6
@angular-devkit/schematics         9.1.6
@angular/cli                       9.1.6
@ngtools/webpack                   9.1.6
@schematics/angular                9.1.6
@schematics/update                 0.901.6
ng-packagr                         9.1.5
rxjs                               6.5.5
typescript                         3.8.3
webpack                            4.42.0

S.O Ubuntu 19.04

@petebacondarwin
Copy link
Member

Transferring to the CLI project.

@clydin clydin transferred this issue from angular/angular May 21, 2020
@alan-agius4
Copy link
Collaborator

Thanks for reporting this, but this is caused by an upstream package and not by the Angular CLI.

See: ng-packagr/ng-packagr#1545

@siegklenes
Copy link
Author

Thanks @alan-agius4 @petebacondarwin @clydin

@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 Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants