@lwrjs/html-view-provider 0.22.8 → 0.22.9

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.
@@ -26,8 +26,8 @@ __markAsModule(exports);
26
26
  __export(exports, {
27
27
  default: () => src_default
28
28
  });
29
- var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
30
29
  var import_path = __toModule(require("path"));
30
+ var import_shared_utils = __toModule(require("@lwrjs/shared-utils"));
31
31
  var import_base_view_provider = __toModule(require("@lwrjs/base-view-provider"));
32
32
  var import_gray_matter = __toModule(require("gray-matter"));
33
33
  var HtmlViewProvider = class extends import_base_view_provider.default {
@@ -84,8 +84,8 @@ var HtmlViewProvider = class extends import_base_view_provider.default {
84
84
  };
85
85
  }
86
86
  };
87
- const fullPath = import_path.default.resolve(sourcePath);
88
- if (this.watcher && !this.cachedViews.has(sourcePath)) {
87
+ const fullPath = (0, import_shared_utils.toForwardSlash)(import_path.default.resolve(sourcePath));
88
+ if (this.watcher && !this.cachedViews.has(fullPath)) {
89
89
  this.cachedViews.set(fullPath, {compiledView, viewId});
90
90
  this.watcher.add(fullPath);
91
91
  }
package/build/es/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { getViewSourceFromFile, canResolveView } from '@lwrjs/shared-utils';
2
1
  import path from 'path';
2
+ import { getViewSourceFromFile, canResolveView, toForwardSlash } from '@lwrjs/shared-utils';
3
3
  import BaseViewProvider from '@lwrjs/base-view-provider';
4
4
  import grayMatter from 'gray-matter';
5
5
  export default class HtmlViewProvider extends BaseViewProvider {
@@ -60,8 +60,8 @@ export default class HtmlViewProvider extends BaseViewProvider {
60
60
  },
61
61
  };
62
62
  // Watch for changes
63
- const fullPath = path.resolve(sourcePath);
64
- if (this.watcher && !this.cachedViews.has(sourcePath)) {
63
+ const fullPath = toForwardSlash(path.resolve(sourcePath));
64
+ if (this.watcher && !this.cachedViews.has(fullPath)) {
65
65
  this.cachedViews.set(fullPath, { compiledView, viewId });
66
66
  this.watcher.add(fullPath);
67
67
  }
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.22.8",
7
+ "version": "0.22.9",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -33,15 +33,15 @@
33
33
  "build": "tsc -b"
34
34
  },
35
35
  "dependencies": {
36
- "@lwrjs/base-view-provider": "0.22.8",
37
- "@lwrjs/shared-utils": "0.22.8",
36
+ "@lwrjs/base-view-provider": "0.22.9",
37
+ "@lwrjs/shared-utils": "0.22.9",
38
38
  "gray-matter": "^4.0.2"
39
39
  },
40
40
  "devDependencies": {
41
- "@lwrjs/types": "0.22.8"
41
+ "@lwrjs/types": "0.22.9"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=22.0.0"
45
45
  },
46
- "gitHead": "66f71f33f5b12fa4e7c7969f0a6239a590c999d1"
46
+ "gitHead": "d0c112cd7b6eb940d6e554d0bbd93fb535465fdc"
47
47
  }