Angular.json not importing assets

Discussão em 'Angular' iniciado por dcp3450, Janeiro 22, 2025.

  1. dcp3450

    dcp3450 Guest

    I have an npm library that I maintain that's used across multiple applications. I'd like to share an scss file that has mixins, functions, etc. I can see, after an npm i the scss files are located in the styles folder as specified in the ng-package.json file:

    ...
    "assets": [ ... {"input": "src/lib/styles", "glob": "**/*.scss", "output": "styles"} ... ]
    ...


    My anguar.json file has the following:

    ...
    "assets": [
    ...
    {
    "glob": "**/*",
    "input": "./node_modules/@company_appstore/company-shared/styles",
    "output": "./src/styles/"
    }
    ...
    ]
    ...


    My assumption is after running my ng serve command Angular would output those files into a styles directory in my src directory. However, those files aren't made available at the src level.

    Continue reading...

Compartilhe esta Página