Skip to content

0.15.0 fails to parse bootstrap ("unexpected }") with keyframes = true #33

Description

@lopopolo

Before you open an issue, please check if a similar issue already exists or has been closed before.

When reporting a bug, please be sure to include the following:

  • A descriptive title

  • An isolated way to reproduce the behavior (example: GitHub repository with code isolated to the issue that anyone can clone to observe the problem): https://github.com/lopopolo/hyperbola, using webpack. To exercise the bug, modify keyframes: true in webpack.config.js and run yarn install && make build

  • What version of purgecss you're using, and the platform(s) you're running it on: 0.15.0

  • The behavior you expect to see, and the actual behavior: actual behavior:

    /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1
    (function (exports, require, module, __filename, __dirname) { "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function normalizeArray(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function resolve(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:"/";if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."}function normalize(e){var t=isAbsolute(e),r="/"===substr(e,-1);return(e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function isAbsolute(e){return"/"===e.charAt(0)}function join(){return normalize(filter(A
    CssSyntaxError: <css input>:6:71741: Unexpected }
        at Input.error (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/input.js:113:22)
        at Parser.unexpectedClose (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:492:26)
         at Parser.end (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:353:18)
        at Parser.parse (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parser.js:68:26)
        at Function.parse (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/node_modules/postcss/lib/parse.js:24:16)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:90949)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:88660)
        at e.value (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss/lib/purgecss.js:1:88224)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:199:83
        at Array.forEach (<anonymous>)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:182:27
        at Array.forEach (<anonymous>)
        at Compilation.<anonymous> (/Users/lopopolo/dev/repos/hyperbola/node_modules/purgecss-webpack-plugin/lib/purgecss-webpack-plugin.js:174:30)
        at next (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:204:14)
        at Compilation.<anonymous> (/Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:275:11)
        at Compilation.applyPluginsAsyncSeries (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:206:13)
        at sealPart2 (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:662:9)
        at next (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/node_modules/tapable/lib/Tapable.js:202:11)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:244:13
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:473:16
        at iteratorCallback (/Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:1050:13)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:958:16
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:227:15
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:473:16
        at iteratorCallback (/Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:1050:13)
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/async/dist/async.js:958:16
        at /Users/lopopolo/dev/repos/hyperbola/node_modules/extract-text-webpack-plugin/dist/index.js:216:21
        at rebuilding.forEach.cb (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:530:29)
        at Array.forEach (<anonymous>)
        at callback (/Users/lopopolo/dev/repos/hyperbola/node_modules/webpack/lib/Compilation.js:530:15)
    make: *** [build] Error 1
    

    Expected behavior: webpack successfully compiles, as it does in 0.14.0

When you open an issue for a feature request, please add as much detail as possible:

  • A descriptive title
  • A description of the problem you're trying to solve, including why you think this is a problem
  • An overview of the suggested solution
  • If the feature changes current behavior, reasons why your solution is better

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions