@knighted/css 1.2.0-rc.0 → 1.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -787,6 +787,15 @@ function isStyleResource(filePath) {
787
787
  const normalized = filePath.toLowerCase();
788
788
  return STYLE_EXTENSIONS.some(ext => normalized.endsWith(ext));
789
789
  }
790
+ function isVanillaExtractResource(filePath) {
791
+ const normalized = filePath.toLowerCase();
792
+ return (normalized.endsWith('.css.ts') ||
793
+ normalized.endsWith('.css.js') ||
794
+ normalized.endsWith('.css.mts') ||
795
+ normalized.endsWith('.css.cts') ||
796
+ normalized.endsWith('.css.mjs') ||
797
+ normalized.endsWith('.css.cjs'));
798
+ }
790
799
  function isCssModuleResource(filePath) {
791
800
  return /\.module\.(css|scss|sass|less)$/i.test(filePath);
792
801
  }
@@ -831,11 +840,11 @@ async function hasStyleImports(filePath, options) {
831
840
  if (!resource) {
832
841
  continue;
833
842
  }
834
- if (isStyleResource(resource)) {
843
+ if (isStyleResource(resource) || isVanillaExtractResource(resource)) {
835
844
  return true;
836
845
  }
837
846
  const resolved = await resolveImportPath(resource, filePath, options.rootDir, options.tsconfig, options.resolver, options.resolverFactory, RESOLUTION_EXTENSIONS);
838
- if (resolved && isStyleResource(resolved)) {
847
+ if (resolved && (isStyleResource(resolved) || isVanillaExtractResource(resolved))) {
839
848
  return true;
840
849
  }
841
850
  }