Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#19,086 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
angular, typescript
Ambito
build-system, cli

Direzione di ricerca

Inizia riproducendo il caso Windows 10 con una junction sotto src/assets, quindi confronta la gestione della cartella collegata da parte di build e serve con l’output di dist/assets. Il lavoro è completo quando vengono copiate le cartelle e i file annidati, come myFolder/does not work.txt, non solo i file direttamente sotto la junction.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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... :)

Lingua principale
TypeScript
Stelle
27k
Fork
11.8k
Merge medio
17h 25m
PR unite (30g)
183

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di angular/angular-cli

Tutte le issue di angular/angular-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.