Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 3 - How to move the theme>variable.scss File

This seems like an easy question, but I can't find the answer.

I have an Ionic 3 project created with ionic CLI so Angular/Webpack. I am trying to delete the theme folder and move the variable.scss file to my sharded scss folder. When I do it - everything blows up and I get an IDE error of "Sass Error File to import not found or unreadable: /Users/blah/src/theme/variables.scss. Parent style sheet: stdin"

like image 709
RooksStrife Avatar asked Feb 03 '26 05:02

RooksStrife


1 Answers

If you move the variables.scss, you have to change the path. Ionic CLI put the path under "variableSassFiles" (in @ionic\app-scripts\config/sass.config.js).

So you have to customize the sass.config.js and put it in your own folder. Afterwards update the package.json and add:

  "config": {
    "ionic_sass": "./your-path-to-config-folder/sass.config.js"
  },

For more Information see https://github.com/ionic-team/ionic-app-scripts#custom-configuration

like image 69
Paul Avatar answered Feb 07 '26 17:02

Paul



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!