excubo-ag / WebCompiler

Apache License 2.0
149 stars 30 forks source link

Cannot disable minifier and gzip with configuration file #5

Closed rwasef1830 closed 4 years ago

rwasef1830 commented 4 years ago

Hello, For some reason even though my config file looks like this:

{
  "Minifiers": {
    "GZip": false,
    "Enabled": false
  },
  "CompilerSettings": {
    "Sass": {
      "IndentType": "Space",
      "IndentWidth": 2,
      "OutputStyle": "Nested",
      "Precision": 5,
      "RelativeUrls": true,
      "LineFeed": "Lf",
      "SourceMap": true
    }
  },
  "Output": {
    "Preserve": true
  }
}

And I run webcompiler tool like this:

dotnet watch tool run webcompiler -r wwwroot 

With the current directory being the project directory that contains webcompilerconfiguration.json It still minifies and gzips the js and css. Basically ignoring the config file. It does this even when I explicitly pass -c webcompilerconfiguration.json

Am I missing something ?

rwasef1830 commented 4 years ago

It seems webcompilerconfguration.json is not searched in the current directory the tool is called from, but instead in the directory passed to -r. This seems to be a regression, or was it the intended behavior ? At least the documentation needs to clarify this point.

stefanloerwald commented 4 years ago

Hi @rwasef1830,

I've started investigating the issue you're experiencing. Here's what I can say so far:

Could you please show the exact command line parameters you're using, and perhaps the directory structure? Thanks!

rwasef1830 commented 4 years ago

Retesting this, you're correct, I was getting confused by a mixture of 2 things in addition to late night.

  1. I accidentally had dotnet watch tool running in another desktop that was interfering with my tests that I couldn't see.
  2. Rider was delayed in updating the directory structure so what I was seeing wasn't immediately reflecting the latest directory structure.

My apologies, this bug report is invalid.

stefanloerwald commented 4 years ago

Thank you for the quick feedback, and no worries: having those two additional tests might just prevent a regression in some future version, so it's a good thing to have it covered. Thanks!