Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT generated scss.shim imported path && scss brackets bugs #12539

Closed
fisherspy opened this issue Oct 26, 2016 · 8 comments
Closed

AOT generated scss.shim imported path && scss brackets bugs #12539

fisherspy opened this issue Oct 26, 2016 · 8 comments

Comments

@fisherspy
Copy link
Contributor

fisherspy commented Oct 26, 2016

I'm submitting a ... (check one with "x")

[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Following angular.io docs:

Using node_modules/.bin/ngc command to generate AOT code into /aot dir,

Include Path Bugs:

For example in home.ngfatory.ts it shows :

image

Actually the structure in AOT dir is:

image

The structure in App dir is :

image

SCSS brackets bugs:

In AOT mode, styles became a mess,

in component.scss.shim shows:

wangwang20161026154111

It has a pair of needless brackets compared to JIT mode, if I delete the brackets in head styles,all became normal

Expected behavior

SCSS Include expected behavior
image

SCSS brackets expected behavior
image

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

AOT shows the same as JIT mode

Please tell us about your environment:

MacOS Serria, Visual Studio Code, NPM

  • Angular version: 2.1.1
  • Browser: [all ]
  • Language: [TypeScript 2.0.3]
  • Node (for AoT issues): 6.8.1
  • Webpack: 2.1.0-beta.25
@fisherspy fisherspy changed the title AOT generate scss.shim include path && scss brackets bugs AOT generated scss.shim include path && scss brackets bugs Oct 26, 2016
@fisherspy fisherspy changed the title AOT generated scss.shim include path && scss brackets bugs AOT generated scss.shim imported path && scss brackets bugs Oct 26, 2016
@DzmitryShylovich
Copy link
Contributor

Hi. Can u pls provide a minimal repository with reproduction?

@robwormald
Copy link
Contributor

Also, how are you running the SCSS compilation? do your components point to foo.css or foo.scss ?

@fisherspy
Copy link
Contributor Author

fisherspy commented Oct 26, 2016

@DzmitryShylovich I will try to make a demo, but I don't think aot files could be generated online,
@robwormald , my webpack configuration runs well in JIT mode, I'm using angular2-template-loader, and the scss compilation is:
image

the component code is:

image

@fisherspy
Copy link
Contributor Author

@robwormald @DzmitryShylovich I know why now, I use scss in styleUrls, and with webpack sass-loader, app runs well in JIT mode using webpack. In AOT mode, I have to run ngc command first, and ngc compiled scss files to scss.shim.ts directly without any scss compilation. The scss.shim.ts include path is wrong, also In scss.shim.ts scss grammer exists(I thought 'shim' means scss is compiled).

@vicb
Copy link
Contributor

vicb commented Oct 28, 2016

@zhaxi does it means this issue can be closed ?

@fisherspy
Copy link
Contributor Author

@vicb , I think it's a bug, cause ngc realize scss is style files, and add shim to scss files, but the include path and style code are not correct.

@0cv
Copy link

0cv commented Oct 29, 2016

This is a dupe of #11688

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants