reactway / scss-bundle

Bundling SCSS files to one bundled file.
MIT License
56 stars 25 forks source link

Add support for fileextension config #89

Open Akkora opened 4 years ago

Akkora commented 4 years ago

Problem We are using the scss-bundler in a project with a lot of other files (like .js, .ts, .json, etc.) The --watch command is triggering the build every time, any file changes, but often there are no changes in the relevant files (.scss, .css, .sass). This is a huge performance problem and therefore slowing down our development process.

Possible Solution A config property called fileExtensions could be included, that describes all the used file extensions.

{
  "bundlerOptions": {
    "entryFile": "my-project/src/entry.scss",
    "outFile": "dist/out.scss",
    "rootDir": "my-project/src",
    "project": "../../",
    "fileExtensions: [
      ".scss",
      ".sass",
      ".css"
    ],
    "ignoreImports": [
      "~@angular/.*"
    ],
    "logLevel": "debug"
  }
}

Alternative Maybe it would make sense to watch only for .scss, .sass, .css as default and do not add this config parameter?