Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abidtkg opened this issue Dec 25, 2023 · 1 comment
Open

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

abidtkg opened this issue Dec 25, 2023 · 1 comment

Comments

@abidtkg
Copy link

abidtkg commented Dec 25, 2023

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.

@maxbauer
Copy link

maxbauer commented Mar 1, 2024

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);
  });
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants