excubo-ag / WebCompiler

Apache License 2.0
148 stars 29 forks source link

Error when Autoprefix is enabled #55

Closed ayyron-dev closed 2 years ago

ayyron-dev commented 2 years ago

Hi, I get an error when AutoPrefix is enabled. I'm not certain if this is an issue with the tools WebCompiler is using or if its an issue with the sass libraries I'm using. I'll post the error i'm seeing and my configuration below. If I Disable Autoprefix, everything builds fine but I'd like to still use Autoprefix.

Is there any additional debugging I can do or any workarounds?

Here is the error message

1>Tool 'excubo.webcompiler' was reinstalled with the latest stable version (version '2.7.13').
1>During processing of CSS code by using the Autoprefixer a JavaScript error has occurred:
1>
1>ReferenceError: 'URL' is not defined
1>-- in file src/css\bootstrap5.css L0:0

Here is my config

{
  "Minifiers": {
    "GZip": true,
    "Enabled": true,
    "Css": {
      "CommentMode": "Important",
      "ColorNames": "Hex",
      "TermSemicolons": true,
      "OutputMode": "SingleLine",
      "IndentSize": 2
    },
    "Javascript": {
      "RenameLocals": true,
      "PreserveImportantComments": true,
      "EvalTreatment": "Ignore",
      "TermSemicolons": true,
      "OutputMode": "SingleLine",
      "IndentSize": 2
    }
  },
  "Autoprefix": {
    "Enabled": true,
    "ProcessingOptions": {
      "Browsers": [
        "last 4 versions"
      ],
      "Cascade": true,
      "Add": true,
      "Remove": true,
      "Supports": true,
      "Flexbox": "All",
      "Grid": "None",
      "IgnoreUnknownVersions": false,
      "Stats": "",
      "SourceMap": true,
      "InlineSourceMap": false,
      "SourceMapIncludeContents": false,
      "OmitSourceMapUrl": false
    }
  },
  "CompilerSettings": {
    "Sass": {
      "IndentType": "Space",
      "IndentWidth": 2,
      "OutputStyle": "Expanded",
      "RelativeUrls": true,
      "LineFeed": "Lf",
      "SourceMap": true,
      "IncludePath": "./node_modules/@syncfusion"
    }
  },
  "Output": {
    "Preserve": true
  }
}
stefanloerwald commented 2 years ago

Hi @ayyron-lmao,

Could you please try with the latest preview version? Autoprefix has been updated a few times, so this might be resolved already.

Thanks Stefan

ayyron-dev commented 2 years ago

Thanks for the reply @stefanloerwald .

Today both versions 2.7.14 and the preview 3.1.2-preview.1 are both working on both my local machine and build server. Do you know if AutoprefixerHost downloads a specific version of autoprefixer or if it use a static version for each release?

stefanloerwald commented 2 years ago

AFAIK it comes with a fixed version. Glad that it's resolved for you now!