WebOptimizer icon indicating copy to clipboard operation
WebOptimizer copied to clipboard

Bootstrap 5.2 and 5.3 JS and Sass do not compile.

Open ryanmasanz opened this issue 2 years ago • 3 comments

I am using the latest build of Web Optimizer and trying to compile Sass for Bootstrap is failing minification, mainly because some variables seem to be leaking through the Sass compiler.

Examples of the errors on the top of the bundle.

/* input(2563,42): run-time error CSS1063: Expected calculation unit, found '$' input(2563,42): run-time error CSS1064: Expected calculation product, found '$' input(2563,42): run-time error CSS1065: Expected calculation sum, found '$' input(2563,42): run-time error CSS1034: Expected closing parenthesis, found '$' input(2563,42): run-time error CSS1063: Expected calculation unit, found '$' input(2563,42): run-time error CSS1064: Expected calculation product, found '$' input(2563,42): run-time error CSS1065: Expected calculation sum, found '$' input(2563,42): run-time error CSS1034: Expected closing parenthesis, found '$' input(2563,42): run-time error CSS1042: Expected function, found '$' input(2563,42): run-time error CSS1062: Expected semicolon or closing curly-brace, found '$' input(2575,40): run-time error CSS1063: Expected calculation unit, found '$' input(2575,40): run-time error CSS1064: Expected calculation product, found '$' input(2575,40): run-time error CSS1065: Expected calculation sum, found '$' input(2575,40): run-time error CSS1034: Expected closing parenthesis, found '$' input(2575,40): run-time error CSS1063: Expected calculation unit, found '$' input(2575,40): run-time error CSS1064: Expected calculation product, found '$' input(2575,40): run-time error CSS1065: Expected calculation sum, found '$' input(2575,40): run-time error CSS1034: Expected closing parenthesis, found '$'

One example line causing some errors in the Sass:

.table-group-divider {
  border-top: calc($table-border-width * 2) solid $table-group-separator-color; // stylelint-disable-line function-disallowed-list
}

Removing the calc() call makes it compile. Doesn't seem like anything odd however.

Similarly, bundling bootstraps JS has a long list of issues:

/* input(16,8-9): run-time error JS1332: Expected "from": * input(16,8-9): run-time error JS1333: Expected string literal: * input(16,7): run-time error JS1004: Expected ';' input(16,8-9): run-time error JS1195: Expected expression: * input(16,12): run-time error JS1004: Expected ';' input(16,19): run-time error JS1004: Expected ';' input(16,24): run-time error JS1004: Expected ';' input(1524,8-9): run-time error JS1332: Expected "from": * input(1524,8-9): run-time error JS1333: Expected string literal: * input(1524,7): run-time error JS1004: Expected ';' input(1524,8-9): run-time error JS1195: Expected expression: * input(1524,12): run-time error JS1004: Expected ';' input(1524,19): run-time error JS1004: Expected ';' input(1524,24): run-time error JS1004: Expected ';' input(16,1-7): run-time error JS1328: Import statement must include module name: import input(937,8-15): run-time error JS1327: Multiple default exports: default input(1220,8-15): run-time error JS1327: Multiple default exports: default

Any thoughts here? I have tried both Bootstrap 5.2 and 5.3. Other Sass compilers / minifier tools are processing it just fine.

ryanmasanz avatar Jan 13 '23 08:01 ryanmasanz

I was able to resolve the JS issue, was just including some files in the sub folders that I did not need (already were imported).

However it is just flat out failing at processing the stock bootstrap.scss still :(

ryanmasanz avatar Jan 14 '23 19:01 ryanmasanz

I think this is related to the version of NUglify used in this. I was using the Visual Studio Bundler and Minifier extensions to minify Bootstrap but they also had the same errors with newest Boostrap until Nuglify was updated.

brenasmith avatar Jan 14 '23 23:01 brenasmith

Should be fixed by #280.

mmarinchenko avatar Sep 25 '23 13:09 mmarinchenko