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

Generated CSS files should be moved to a different directory #153

Closed
vially opened this issue Jul 30, 2018 · 4 comments
Closed

Generated CSS files should be moved to a different directory #153

vially opened this issue Jul 30, 2018 · 4 comments
Milestone

Comments

@vially
Copy link

vially commented Jul 30, 2018

What is the expected behavior?

Importing the sass files should work as expected.

What is the current behavior?

Importing any sass file (e.g.: @import '~@ngx-gallery/core/styles/lightbox';) throws error:

It's not clear which file to import for @ngx-gallery/core/styles/lightbox. Candidates:
Candidates:
  @ngx-gallery/core/styles/lightbox.scss
  @ngx-gallery/core/styles/lightbox.css
Please delete or rename all but one of these files.

What are the steps to reproduce?

Trying to import any scss file from the styles directory without specifying the .scss extension results in the error mentioned above. This is because node-sass does not support having both .css and .scss files in the same directory: node-sass#1222

What is the use-case or motivation for changing an existing behavior?

Being able to import the .scss file without throwing any errors.

Which versions are you using for the following packages?

Angular: 5.2.10
Angular CDK: 5.2.4
Angular CLI: N/A
Typescript: 2.6.2
Gallery: 2.2.1

Is there anything else we should know?

Moving the generated .css files to a different directory should fix this issue.

@MurhafSousli
Copy link
Owner

@vially I tried it without the extension and it worked! like in here

@vially
Copy link
Author

vially commented Aug 1, 2018

I can see most of the examples where it works are using angular-cli. I'm testing it in an ionic project (which is not using angular-cli) and it fails with the above error.

I suppose ionic and angular-cli might have a different configuration for handling sass imports (it looks like angular-cli is using webpack sass-loader while ionic is not).

Ideally this project should support both (e.g.: by not generating the CSS files in the same directory), but if that's not possible adding a note about this issue to the documentation might help.

@MurhafSousli
Copy link
Owner

MurhafSousli commented Aug 1, 2018

Is it still not working at all or you figured it out?

@vially
Copy link
Author

vially commented Aug 1, 2018

It's still not working and I don't expect it will until it's fixed in either:

  • ngx-gallery by moving the generated CSS files to a different directory
  • libsass by removing support for inline CSS imports libsass#2611
  • ionic by moving to angular-cli (which will happen in ionic 4)

@MurhafSousli MurhafSousli added this to the 3.1.0 milestone Aug 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants