postcss/postcss-url

@import url external link with a space

Closed this issue · 0 comments

Hi,
after upgrading to Angular 13 and postcss

    "postcss": "^8.3.11",
    "postcss-import": "^14.0.2",
    "postcss-url": "^10.1.3",

importing of fonts stopped working properly when space is in the url.
@import url('https://fonts.googleapis.com/css?family=Roboto%20Mono&display=swap');

will throw compilation error

<e> styles.css:2:59: error: Expected ")" to end URL token
<e>     at failureErrorWithLog (/Users/jiu/Projects/Rikarin/xui/node_modules/esbuild/lib/main.js:1493:15)
<e>     at /Users/jiu/Projects/Rikarin/xui/node_modules/esbuild/lib/main.js:1282:29
<e>     at /Users/jiu/Projects/Rikarin/xui/node_modules/esbuild/lib/main.js:629:9
<e>     at handleIncomingPacket (/Users/jiu/Projects/Rikarin/xui/node_modules/esbuild/lib/main.js:726:9)
<e>     at Socket.readFromStdout (/Users/jiu/Projects/Rikarin/xui/node_modules/esbuild/lib/main.js:596:7)
<e>     at Socket.emit (events.js:400:28)
<e>     at addChunk (internal/streams/readable.js:293:12)
<e>     at readableAddChunk (internal/streams/readable.js:267:9)
<e>     at Socket.Readable.push (internal/streams/readable.js:206:10)
<e>     at Pipe.onStreamRead (internal/stream_base_commons.js:188:23)

After removing the space %20 everything works fine.

Here's example project https://github.com/Rikarin/xui