Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Junctions (linked folders) in the assets folder are only partially copied to the build output

Đang mở
#19,086 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
build-system, cli

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện trường hợp Windows 10 với một junction bên dưới src/assets, sau đó so sánh cách build và serve xử lý thư mục được liên kết với đầu ra dist/assets. Hoàn tất khi các thư mục và tệp lồng nhau như myFolder/does not work.txt được sao chép, không chỉ các tệp nằm ngay dưới junction.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: @angular-devkit/build-angular devkit/build-angular:browser feature feature: insufficient votes

🐞 Bug report

Command
  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc
Is this a regression?

Did not work with ng 8 and does not work with ng 10. Did not check with 9 or anything before 8.

Description

When creating a junction inside the src/assets folder to another folder somewhere in the filesystem, the compiled output only contains the files that are directly beneath the linked folder. Any sub-folders in this linked folder are ignored by the compiler.

🔬 Minimal Reproduction

Tested on Windows 10:

  1. Create an empty angular app with ng new assetsBugApp,
  2. create a folder outside the application like "testAssets"
  3. Inside "testAssets" create a textfile "works.txt"
  4. Inside "testAssets" create a folder "myFolder"
  5. Inside "testAssets/myFolder" create a textfile "does not work.txt"
  6. Create a junction from "assetsBugApp/src/assets/test" to "testAssets" (eg mklink /J C:\tmp\assetsBugApp\src\assets\test C:\tmp\testAssets)
  7. Run ng build
  8. Look in the dist/assets folder. You will find the folder "test" containing "works.txt" but no "myFolder" and no "does not work.txt"

🌍 Your Environment


Angular CLI: 10.1.4
Node: 12.18.3
OS: win32 x64

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

Package                            Version
------------------------------------------------------------
@angular-devkit/architect          0.1001.4
@angular-devkit/build-angular      0.1001.4
@angular-devkit/build-ng-packagr   0.1001.4
@angular-devkit/core               10.1.1
@angular-devkit/schematics         10.1.4
@angular/cdk                       10.2.3
@angular/language-service          10.1.1
@angular/material                  10.2.3
@schematics/angular                10.1.4
@schematics/update                 0.1001.4
ng-packagr                         10.1.2
rxjs                               6.6.3
typescript                         3.9.7

Anything else relevant?
Might be isolated to Windows environments.

Would be great to have this resolved, copying assets from A to B is less fun than linking them... :)

Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
16 giờ 35 phút
Pull request đã merge (30 ngày)
176

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.