Kaki Master Of Time
Kaki Master Of Time

Reputation: 1631

Importing .CSS files into ionic 2 Apps

i am doing an app with Ionic 2 Angular 2 and Typescript and i need to import some .CSS files of Jquery UI. I needed the datepicker form JqueryUI but i also need to import CSS files to make it look and feel as wanted.

I need the imports to be global since i use the datepicker in different pages, so i added an import statement in app.scss in the app folder and it worked, on browser only. When i compile in production mode i get " Broken @import statement "error which i didn't understand.

So does anyone know how to properly import the external CSS files for Jquery UI or is there anyway to fix the Broken @import error ?

thank you!

Upvotes: 1

Views: 340

Answers (1)

sebaferreras
sebaferreras

Reputation: 44669

Based on this github issue, the cause of the problem seems to be the clean-css module.

One way to fix it, would be to add

module.exports = {
    options:{
      processImport:false
  }
};

to ./node_modules/config/cleancss.config.js.

Upvotes: 1

Related Questions