windicss-webpack-plugin
Advanced tools
Comparing version 1.7.0 to 1.7.1
@@ -8,5 +8,5 @@ "use strict"; | ||
const templatePitcherTest = l => /(\/|\\|@)windicss-template/.test(l.path); | ||
const windiTemplateTest = l => /(\/|\\|@)windicss-template/.test(l.path); | ||
const windiPitcherTest = l => /(\/|\\|@)windicss-style-pitcher/.test(l.path); | ||
const windiStylePitcherTest = l => /(\/|\\|@)windicss-style-pitcher/.test(l.path); | ||
@@ -18,5 +18,7 @@ const postCssLoaderTest = l => /(\/|\\|@)postcss-loader/.test(l.path); | ||
const pitch = function (remainingRequest) { | ||
const findLoaderIndex = test => this.loaders.findIndex(test); | ||
const findLoaderIndex = test => this.loaders.findIndex(loader => { | ||
return test(loader) && !loader.normalExecuted; | ||
}); | ||
const removeLoader = test => { | ||
const markLoaderAsExecuted = test => { | ||
let index, loader; | ||
@@ -26,3 +28,4 @@ | ||
loader = this.loaders[index]; | ||
this.loaders.splice(index, 1); | ||
loader.pitchExecuted = true; | ||
loader.normalExecuted = true; | ||
} | ||
@@ -33,6 +36,6 @@ | ||
removeLoader(windiPitcherTest); | ||
markLoaderAsExecuted(windiStylePitcherTest); | ||
if (!remainingRequest.includes("&type=style")) { | ||
removeLoader(templatePitcherTest); | ||
markLoaderAsExecuted(windiTemplateTest); | ||
return; | ||
@@ -45,7 +48,7 @@ } | ||
if (newTemplateLoaderIndex === -1) { | ||
removeLoader(templatePitcherTest); | ||
markLoaderAsExecuted(windiTemplateTest); | ||
return; | ||
} | ||
const templateLoader = removeLoader(templatePitcherTest); | ||
const templateLoader = markLoaderAsExecuted(windiTemplateTest); | ||
if (templateLoader) this.loaders.splice(newTemplateLoaderIndex + 1, 0, templateLoader); | ||
@@ -52,0 +55,0 @@ }; |
{ | ||
"name": "windicss-webpack-plugin", | ||
"version": "1.7.0", | ||
"version": "1.7.1", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -45,3 +45,4 @@ <h1 align='center'>windicss-webpack-plugin</h1> | ||
Add the import with your existing windi imports and you'll have autocompletion in your Chrome DevTools! | ||
Add the import with your existing windi imports and you'll have autocompletion in your Chrome DevTools! See ["Design in DevTools"](https://windicss.org/integrations/vite.html#design-in-devtools) for | ||
more information. | ||
@@ -48,0 +49,0 @@ ```js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49802
1172
109