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

Unable to use grapes' scss files in react project #2747

Merged
merged 1 commit into from
May 6, 2020
Merged

Conversation

8byr0
Copy link
Contributor

@8byr0 8byr0 commented Apr 30, 2020

The following error occurs when compiling a react project:

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
  >  @import "node_modules/spectrum-colorpicker/spectrum";
  >  @import "node_modules/codemirror/lib/codemirror";
  >  @import "node_modules/codemirror/theme/hopscotch";

The file creating this is a scss file using main.scss:

@use '~grapesjs/src/styles/scss/main.scss';
@import '../fonts/MyFontsWebfontsKit.css';

$primaryColor: #444;
$secondaryColor: #ddd;
$tertiaryColor: #012f85;
$quaternaryColor: #23a543;

This is just a fix to make it work but the deprecated use of @import in grapesjs' sass files should also be considered (https://sass-lang.com/documentation/at-rules/import), don't you think so ?

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
```
SassError: Can't find stylesheet to import.
  >  @import "node_modules/spectrum-colorpicker/spectrum";
```
@artf artf merged commit bfe9e76 into GrapesJS:dev May 6, 2020
@artf
Copy link
Member

artf commented May 6, 2020

Thanks @8byr0 and yeah, probably you're right about imports

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

Successfully merging this pull request may close these issues.

None yet

2 participants