From 154c1ed5fbbb75a666c30e8af766bb5a683e0b71 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Mon, 7 Dec 2020 19:17:32 +0000 Subject: [PATCH] Don't bundle CSS urls starting # --- lib/css-plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/css-plugin.js b/lib/css-plugin.js index b97bc1f9..43e040b3 100644 --- a/lib/css-plugin.js +++ b/lib/css-plugin.js @@ -90,7 +90,7 @@ export default function (resolveFileUrl) { }), postCSSUrl({ url: ({ relativePath, url }) => { - if (/^(https?|data):/.test(url)) return url; + if (/^((https?|data):|#)/.test(url)) return url; const parsedPath = parsePath(relativePath); const source = readFileSync( resolvePath(dirname(path), relativePath),