Skip to content

bug: 4.6.0 missing scss files #18639

Closed
Closed

Description

@MarkChrisLevy

Bug Report

Ionic version:

[x] 4.6.0

Current behavior:
In this build, all scss files (from themes dir, component dir or any other var file) are missing.

Expected behavior:
They should be present in @ionic/core/dist.

Steps to reproduce:
Just install latest version, @ionic/core is missing those files.

Ionic info:

4.6.0

Activity

  1. liamdebeasi commented on Jun 27, 2019

    @liamdebeasi
    Contributor

    Hi there,

    Thanks for the issue! Can you provide a repository with the code required to reproduce this issue? Also, can you provide the output of running ionic info from your project's directory?

    Thanks!

  2. hiepxanh commented on Jun 27, 2019

    @hiepxanh
    Contributor

    remove node_modules then install again

  3. added and removed
    needs: replythe issue needs a response from the user
    on Jun 27, 2019
  4. fmendoza commented on Jun 27, 2019

    @fmendoza

    Same issue here. I need to reload my browser several times to avoid a white screen.

  5. added and removed
    needs: replythe issue needs a response from the user
    on Jun 27, 2019
  6. brandyscarney commented on Jun 27, 2019

    @brandyscarney
    Member

    Please provide more details for us to look into this. What framework are you using? How are you building the app? Where are you seeing the errors?

    There are some details missing from ionic info on the original issue. Please run it in a terminal, you should get something like the following if inside of an Angular app:

    Ionic:
       Ionic CLI                     : 5.1.1
       Ionic Framework               : @ionic/angular 4.6.0
       @angular-devkit/build-angular : 0.13.9
       @angular-devkit/schematics    : 7.3.9
       @angular/cli                  : 7.3.9
       @ionic/angular-toolkit        : 1.5.1
    

    Thank you!

  7. 6 remaining items

  8. MarkChrisLevy commented on Jun 27, 2019

    @MarkChrisLevy
    ContributorAuthor

    @brandyscarney In my case I use scss in building custom components, that are more or less based on ionic components (e.g. my own select component or date picker). I'm not saying it is a must to use scss files, but I wasn't aware that is not part of public API (scss files were public in previous versions, so maybe that is why I'm using it).

  9. brandyscarney commented on Jun 27, 2019

    @brandyscarney
    Member

    @lincolnthree There should not be any issues with including the css files that way. That is our recommended project setup. You may be running into a different issue if you're not directly importing any scss files. I tried creating a new app using the following commands:

    $ ionic -v
    5.1.1
    
    $ ionic start myApp
    
    > tabs
    
    $ cd myApp
    $ ionic serve
    

    I am not seeing any issues with the CSS in Chrome or Safari. Could you try removing node_modules completely and doing a fresh install? Or are you seeing it in a different browser/device?

    rm -rf ./node_modules
    npm i
    

    If you're still seeing issues after this can you open a new issue please. 🙂

  10. brandyscarney commented on Jun 27, 2019

    @brandyscarney
    Member

    @MarkChrisLevy We likely didn't do a great job explaining the move away from Sass as a public API with all of the changes in Ionic 4. When we moved to Ionic 4 with web components it allowed us to remove the requirement of rebuilding all of Ionic's Sass every time a change was made by a developer in their app. This meant that the Sass variables were no longer available by default in an app but it also improved build times. We chose to use CSS variables to replace the Sass variables for theming because they allow runtime changes and can work with Shadow DOM. There are many places where we're actually not even using the defined Sass variables anymore in Ionic which could cause issues if you're importing them and wanting them to match our design. Since Sass became an internal tool of Ionic we decided it wouldn't be a public facing API because our internals around design change rapidly and with the move to follow SemVer it would be hard to not introduce breaking changes related to Sass changes.

    We'll add the Sass files back for a hotfix 4.6.1 release (planning on tomorrow if all goes well) but it is planned to be removed for Ionic 5. Do you foresee any issues with relying on the CSS variables? We've had this issue open for awhile that I think would be helpful for reusing some of Ionic's variables: #15229. We're open to feedback if you think there is a definite need for keeping the files at the risk of breaking changes.

  11. lincolnthree commented on Jun 27, 2019

    @lincolnthree

    @brandyscarney White page seems to be due to the root <html> element never receiving the "hydrated" class. No errors. I will open a new issue when I find the cause (if it's a bug.) Not sure what changed on 4.6.0 but when I add the class everything works fine. Digging.

  12. MarkChrisLevy commented on Jun 27, 2019

    @MarkChrisLevy
    ContributorAuthor

    @brandyscarney I really appreciate that you will restore scss files - it will give me the time to switch to css variables or not to use ionic variables at all. I always support your (ionic's) decisions to move forward, even if it means a bit of additional work. Once again - thanks!

  13. brandyscarney commented on Jun 28, 2019

    @brandyscarney
    Member

    Linking the issue by @lincolnthree for the white screen: #18649

    It seems to be related to having multiple copies of Stencil installed. We are looking into it.

  14. lincolnthree commented on Jun 28, 2019

    @lincolnthree

    @brandyscarney Oops! Thanks, I thought I put a link in there! Too many edits :)

  15. manucorporat commented on Jun 28, 2019

    @manucorporat
    Contributor

    Where you importing the SCSS exactly from? which path? can yo provide a code example?

  16. MarkChrisLevy commented on Jun 29, 2019

    @MarkChrisLevy
    ContributorAuthor

    @manucorporat As I wrote, I build my own components and I'm using *.vars.scss, e.g. components/select/select.vars.scss. But again - if that is a problem for you to bring scss files back to dist, then I will make appropriate changes in my components and will stop using scss files. I created this bug report cause there was no info about removing scss files from the builds and thought that it was a mistake. So if you don't feel comfortable with restoring them back then it is not worth to lose time on thinking about it ;-)

  17. added a commit that references this issue on Jul 1, 2019
    3eb4792
  18. MarkChrisLevy commented on Jul 9, 2019

    @MarkChrisLevy
    ContributorAuthor

    It is fixed in 4.6.1. Thanks @brandyscarney!

  19. ionitron-bot commented on Aug 9, 2019

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  20. locked and limited conversation to collaborators on Aug 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