angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Allow use of relative paths outside app folder for css files when building in aot

Open abidmix opened this issue 9 years ago • 3 comments

Bug Report or Feature Request (mark with an x)

- [X ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

_                      _                 ____ _     ___

/ \ _ __ __ _ _ | | __ _ _ __ / | | | | / △ \ | ' \ / _ | | | | |/ _ | '| | | | | | | / ___ | | | | (| | || | | (| | | | || | | | // __| ||_, |_,||_,|| _||| |___/ @angular/cli: 1.4.4 node: 6.11.3 os: win32 x64 @angular/animations: 4.4.6 @angular/common: 4.4.6 @angular/compiler: 4.4.6 @angular/core: 4.4.6 @angular/forms: 4.4.6 @angular/http: 4.4.6 @angular/material: 2.0.0-beta.8 @angular/platform-browser: 4.4.6 @angular/platform-browser-dynamic: 4.4.6 @angular/router: 4.4.6 @angular/upgrade: 4.4.6 @angular/cli: 1.4.4 @angular/compiler-cli: 4.4.4 typescript: 2.3.4

Repro steps.

Put css files outside app folder Reference the folder relatively. The app builds fine in JIT mode

Try the same in AOT mode Build breaks

The log given by the failure.

image

Desired functionality.

What would like to see implemented? I should be able to reference files outside the App folder both in JIT and AOT modes

What is the usecase?

We adhere to using css files and html files from specific locations in our orginization. And I should not be moving my css files in the app folder for aot to work.

HTML templates are located in their location in AOT mode, so should be css files.

Mention any other details that might be useful.

Folder structure is like this css Templates Scripts |___ | app |__ mycomunities entrypoint.ts I should be able to reference the css and Template folder both in JIT and AOT mode without moving the css folder in the app folder for AOT compilation to work. As you can see in the image posted its looking for css files relative to the app folder.

abidmix avatar Nov 06 '17 17:11 abidmix

@Brocco I think it would be nice to have this function. To solve this problem, I eventually copied the CSS file into a project.

legends-of-dorothy avatar Nov 16 '17 14:11 legends-of-dorothy

This is now working as expected in 1.7.0

abidmix avatar Feb 23 '18 18:02 abidmix

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.