Image cropping plugin

Have you override the sass.config.js script to copy the needed css?

In package.json add a config to your own local sass.config.js

"config": {
    "ionic_sass": "./scripts/sass.config.js"
},

then create your own local script

module.exports = {
      includePaths: [
        'node_modules/ionic-angular/themes',
        'node_modules/ionicons/dist/scss',
       'node_modules/cropperjs/dist'
  ]
};

finally add your import

@import "cropper";

in one of your scss file. I added it personally in app.component.scss

Note: When you gonna run ionic serve, if you modify something to a scss, the live reload my produce an error that the reload weren’t able to find that included css file. There is an open issue about that in the @scripts project of Ionic

2 Likes