Skip to content

How to add a file to the build system (dist) folder #2613

Closed

Description

@hassanasad

Hi!

Can someone please let me know how to add a simple file to the build system in angular-cli. For example, i want to keep a file called web.config in dist folder when the build is created. If i simply put it in my /src/ folder, it doesn't get copied. I am using beta.17 version of Angular-cli.

Any help will be appreciated :)

Activity

  1. grizzm0 commented on Oct 9, 2016

    @grizzm0
    Contributor

    The config key apps.assets accepts an array as of beta.17. You can now do the following.

    "assets": [
      "assets",
      "favicon.ico"
    ]
    
  2. hassanasad commented on Oct 10, 2016

    @hassanasad
    Author

    I did try that - but its still not copying it.

    This is my app.assets:
    "assets": ["assets", "web.config"]

    I ran the command ng build --prod

    Still no web.config in dist folder even though its present in /src/

  3. hassanasad commented on Oct 10, 2016

    @hassanasad
    Author

    Actually - when i make app.assets an array, i dont even get my assets folder in the dist folder.

  4. grizzm0 commented on Oct 10, 2016

    @grizzm0
    Contributor

    Sorry, my fault. It was merged after beta.17 was released. It's currently in master and will be released with beta.18.

    See: #2570

  5. hassanasad commented on Oct 10, 2016

    @hassanasad
    Author

    oh - thanks grizzm0. Guess nothing more to do other than to wait for beta.18 :)

  6. grizzm0 commented on Oct 10, 2016

    @grizzm0
    Contributor

    @filipesilva Could you close?

  7. bdv1234 commented on Jul 4, 2019

    @bdv1234

    The config key apps.assets accepts an array as of beta.17. You can now do the following.

    "assets": [
      "assets",
      "favicon.ico"
    ]
    

    hey, now apps.assets refer to the ".angular-cli.json" right, if so, I added staticfile.txt in the assets array, but when I run "ng build --prod" command , it didn't create staticfile.txt in the dist folder.

  8. angular-automatic-lock-bot commented on Sep 9, 2019

    @angular-automatic-lock-bot

    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.

  9. locked and limited conversation to collaborators on Sep 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions