Closed strmer15 closed 10 months ago
This is unrelated to vite
or postcss-import
.
It can be reproduced with only a specific sourcemap and PostCSS itself : https://github.com/postcss/postcss/issues/1914#issuecomment-1909010753
I'd suggest we close this here given that it isn't actionable here.
Seems to be even further upstream in source-map-js
: https://github.com/7rulnik/source-map-js/issues/18
The
postcss-import
plugin currently usesnull
as the default value of theparser
when callingprocess
inpostcss
, see https://github.com/postcss/postcss-import/blob/d8a9f21f0f62077d05d9b60680cd50e3546fdf6e/lib/process-content.js#L41.However, in
postcss
8.4.33, theparser
option was required to be truthy, when before just being "not undefined" would work. See https://github.com/postcss/postcss/commit/c37346d61aa6a5eda3515ff3d271764deb77440aTo fix this, the
postcss-import
plugin should only send truthy values to theprocess
function as theparser
option. Either that, orpostcss
needs to fix it on their side in https://github.com/postcss/postcss/issues/1914.Because of this,
vite
builds are now throwing the errororiginal.line and original.column are not numbers
for@import
statements in our SASS files.