Skip to content

Adding external styles or scripts does not work if project is create without --link-cliΒ #1859

@radezz

Description

@radezz

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
    MacOSX

  2. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:
    6.2.2

  3. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.
    -- create new project following readme: ng new test-project
    -- add external bootstrap styles and scripts following readme docs
    -- run: ng build

    no scripts nor styles are bundled.

  4. The log given by the failure. Normally this include a stack trace and some
    more information.
    none

  5. Mention any other details that might be useful.
    Everything works correctly when you setup project using:
    ng new test-project --link-cli

this happens because depending on how you generate project (with or without --link-cli) project is created with different angular-cli.json files.

Proposed solution:

  1. Make --link-cli enabled by default.
    2 If --link-cli not being default is desired please document this flag and explain what it does and what is difference and why scripts and styles can be added only for this particular angular-cli.json setup (perhaps it is just a bug).

I have noticed that your e2e tests always use --link-cli when creating project that is why this was probably missed, and this way I have found out how to generate setup where I can add external 3rd party scripts and styles.


Thanks! We'll be in touch soon.

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