andcmatias / grapesjs-code-editor

GrapesJS plugin Code Editor using Monaco Editor
7 stars 1 forks source link

styles.scss is not properly working #6

Closed pety-dc closed 1 year ago

pety-dc commented 1 year ago

Hey @andcmatias

thanks for accepting my PRs

However when I updated the package I noticed that there is no new built version in the dist folder yet. I tried to import the index.js from the src folder instead. But then I got an error in styles.scss

It seems to me that styles.scss is not a real scss file. I have sass interpreter in my project and it seems to me that you don't. Therefore I guess webpack doesn't try to interpret it as a real scss file. If I remove the 'export default' line from the beginning and ticks, then another error occurs that it misses the $prefix variable. If I rename it locally to styles.js it works as expected.

I'm not quite into scss but grapesjs-component-code-editor does this differently (it also has sass as dependency)

If you do not wish to bother to research and apply the scss handling, would you care to either rename the file to styles.js (and import it by that name in the index.js) Or build and upload a new dist version?

Thx

andcmatias commented 1 year ago

Hey @andcmatias

thanks for accepting my PRs

However when I updated the package I noticed that there is no new built version in the dist folder yet. I tried to import the index.js from the src folder instead. But then I got an error in styles.scss

It seems to me that styles.scss is not a real scss file. I have sass interpreter in my project and it seems to me that you don't. Therefore I guess webpack doesn't try to interpret it as a real scss file. If I remove the 'export default' line from the beginning and ticks, then another error occurs that it misses the $prefix variable. If I rename it locally to styles.js it works as expected.

I'm not quite into scss but grapesjs-component-code-editor does this differently (it also has sass as dependency)

If you do not wish to bother to research and apply the scss handling, would you care to either rename the file to styles.js (and import it by that name in the index.js) Or build and upload a new dist version?

Thx

@pety-dc

I have already made the change