assets entry for the build-angular does not support yarn pnp package paths?
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- angular, typescript
- Domínio
- build-system
Direção de pesquisa
Comece reproduzindo o problema com as etapas fornecidas ng new, yarn add, a entrada de assets em angular.json e yarn build; em seguida, rastreie o tratamento de assets do build-angular e a resolução de caminhos de pacotes. Considera-se concluído quando um caminho de dicionário de assets de um pacote Yarn Plug'n'Play é aceito e copiado para a saída configurada sem o erro de project source-root.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Command
build
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
It does not appear to be possible to include assets and paths from a yarn pnp package.
It seems that build-angular builder supports pnp package resolution for styles, but not assets.
I would expect the assets path (dictionary specification option) to work to copy paths from pacakges in the pnp environment.
Minimal Reproduction
% ng new test-yarn-example --style scss --no-routing
% cd test-yarn-example
% yarn add ng2-pdfjs-viewer
Next, add the path to the angular.json.
Just adding the string will result in the error saying it must be in the project source root.
Adding the dictionary version, yields no error but does not copy the assets either.
{
"glob": "**/*",
"input": "node_modules/ng2-pdfjs-viewer/pdfjs",
"output": "/assets/pdfjs"
}
% yarn build
Exception or Error
Unable to copy assets: The ng2-pdfjs-viewer/node_modules/pdfjs asset path must start with the project source root.
Your Environment
Angular CLI: 16.0.2
Node: 18.15.0
Package Manager: yarn 3.5.0
OS: darwin arm64
Angular: 16.0.2
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1600.2 (cli-only)
@angular-devkit/build-angular 16.0.2
@angular-devkit/core 16.0.2 (cli-only)
@angular-devkit/schematics 16.0.2 (cli-only)
@schematics/angular 16.0.2 (cli-only)
rxjs 7.8.1
typescript 5.0.4
Anything else relevant?
No response
- Linguagem predominante
- TypeScript
- Estrelas
- 27k
- Forks
- 11.8k
- Merge médio
- 17h 25min
- PRs com merge (30d)
- 183
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/angular-cli
-
area: @angular/build gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
angular/angular-cli#33055 · 1 comentário · 3 reações ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 responsável ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 responsável ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 1 responsável ·
Todas as issues de angular/angular-cli
Issues semelhantes
-
[Bug]: Discord Activity titles with emoji are rejected as over 80 characters when they are not Abertaclawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
supermomonga/zcode-acp#24 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
growthbook/growthbook#7100 ·
-
triage
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100