postcss / postcss-calc

PostCSS plugin to reduce calc()
MIT License
213 stars 34 forks source link

JisonLexerError: Lexical error on line 1: Unrecognized text - Erroneous area #99

Closed seth100 closed 4 years ago

seth100 commented 4 years ago

Hi,

I am using nuxt.js and the RFS unit resizing engine. After updating to the latest version v9.0.1 I have the following errors happening for every occorrence of @include font-size(...); mixin (see https://github.com/twbs/rfs#input).

E.g.

@include font-size(4rem);

generates:

font-size: calc(1.525rem + 3.3vw);

but in my case, after postcss, it is:

1.525rem3.3vw

and the complete errors is:

Module build failed (from ./node_modules/postcss-loader/src/index.js):                                                                                                                   friendly-errors 20:44:54
JisonLexerError: Lexical error on line 1: Unrecognized text.

  Erroneous area:
1: 1.525rem3.3vw
^...^

Could you please fix it? Thanks

jasminexie commented 4 years ago

I don't think this is a postcss-calc problem. I've tested font-size: calc(1.525rem + 3.3vw); with postcss and postcss-calc (latest versions) and the expression has not been reduced. The tests in this project also cover similar cases.

Edit: Not a postcss-calc problem. Noticed that RFS is providing a bugfix for your issue which will hopefully be released soon. https://github.com/twbs/rfs/pull/177

seth100 commented 4 years ago

Great, thank you for the info