AhamedBilal/ngx-photo-editor

Angular 17 has issue in css [photo-editor.css]

Opened this issue · 1 comments

File Name: ngx-photo-editor/photo-editor.css
In line 1 casing issue @import "~cropperjs/dist/cropper.css";
It's working now as @import "../cropperjs/dist/cropper.css";
in Angular 17

Please anyone review that and fix it.

I'm using a quick & dirty prebuild script which replaces the import in my Angular 17 project

const fs = require('fs');
const path = require('path');

// Define the path to the file you want to modify
const filePath = path.join(__dirname, 'node_modules/ngx-photo-editor/photo-editor.css');

// Read the content of the file
fs.readFile(filePath, 'utf8', (err, data) => {
  if (err) {
    return console.log(err);
  }

  // Replace the import statement
  const result = data.replace('@import "~cropperjs/dist/cropper.css";', '@import "../cropperjs/dist/cropper.css";');

  // Write the file back
  fs.writeFile(filePath, result, 'utf8', (err) => {
     if (err) return console.log(err);
  });
});