Skip to content
This repository was archived by the owner on Oct 2, 2020. It is now read-only.

Comments

Add paths from 'includePaths' to Sass compiler#78

Open
pamtbaau wants to merge 1 commit intoelectron-userland:masterfrom
pamtbaau:sass-includePaths
Open

Add paths from 'includePaths' to Sass compiler#78
pamtbaau wants to merge 1 commit intoelectron-userland:masterfrom
pamtbaau:sass-includePaths

Conversation

@pamtbaau
Copy link

I've seen and encountered some issues regarding imports in Sass files. The proposed changes fixed the issues for me.

I use the property includePaths in .compilerc which is read by sass.js. The property includePaths is added to this.compilerOptions but is not a valid option for the compiler. So, after reading the property and adding the paths to be included to paths, I discard it before is gets passed to sass.compiler.

I've tested the changes in a standard project created by electron-forge init and added a few stylesheets containing imports (e.g. bootstap scss files).

The includePaths is added to .compilerc like:

  "env": {
    "development": {
      "text/scss": {
        "includePaths": ["../../node_modules/bootstrap/scss"]
      },
      ...

The includePaths are relative to the stylesheet being compiled.

@alreece45
Copy link

Is this different from the paths option?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants