@moritzloewenstein/vite-plugin-sass-glob-import 6.0.0 → 6.0.2

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.
Files changed (2) hide show
  1. package/dist/index.mjs +2 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -25,6 +25,7 @@ function sassGlobImports(_options = {}) {
25
25
  config.logger.warn(
26
26
  "vite-plugin-sass-glob-import: set server.watch: true for automatic glob module invalidation"
27
27
  );
28
+ options.autoInvalidation = false;
28
29
  }
29
30
  },
30
31
  configureServer(_server) {
@@ -89,7 +90,7 @@ function transform(src, id) {
89
90
  const result = [...src.matchAll(IMPORT_REGEX)];
90
91
  if (result.length === 0) continue;
91
92
  const [importRule, startComment, importType, globPattern, endComment] = result[0];
92
- if (options.autoInvalidation) {
93
+ if (options.autoInvalidation && server?.watcher) {
93
94
  const projectGlob = path.relative(
94
95
  projectRoot,
95
96
  path.resolve(path.join(filePath, globPattern))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moritzloewenstein/vite-plugin-sass-glob-import",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Use glob syntax for imports in your main Sass or SCSS file.",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",