From 49cf2aa590c462cd5d151919eee1de9bba0a9bc3 Mon Sep 17 00:00:00 2001 From: h-a-n-a Date: Fri, 2 Jun 2023 00:46:47 +0800 Subject: [PATCH] fix: windows path --- src/pitcher.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/pitcher.ts b/src/pitcher.ts index f12f5405a..426dd1c7d 100644 --- a/src/pitcher.ts +++ b/src/pitcher.ts @@ -88,9 +88,13 @@ export const pitch = function () { return typeof loader === 'string' ? loader : loader.request }) .join('!') - return `@import "${context.resourcePath}${ - query.lang ? `.${query.lang}` : '' - }${context.resourceQuery}!=!-!${loaderString}!${context.resource}";` + const styleRequest = stringifyRequest( + context, + `${context.resourcePath}${query.lang ? `.${query.lang}` : ''}${ + context.resourceQuery + }!=!-!${loaderString}!${context.resource}` + ) + return `@import ${styleRequest};` } const cssLoaderIndex = loaders.findIndex(isCSSLoader) if (cssLoaderIndex > -1) {