vite-plugin-twig-drupal 1.4.0 → 1.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vite-plugin-twig-drupal",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Provides a ⚡️ Vite plugin to transform 🌱 Twig into HTML with a 💧 Drupal flavour",
5
5
  "keywords": [
6
6
  "Vite",
package/src/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import Twig from "twig"
2
2
  import { resolve, dirname } from "node:path"
3
3
  import { existsSync } from "node:fs"
4
+ import { normalizePath } from "vite"
4
5
 
5
6
  const { twig } = Twig
6
7
 
@@ -29,14 +30,15 @@ const resolveFile = (directory, file) => {
29
30
  for (const ix in filesToTry) {
30
31
  const path = resolve(filesToTry[ix])
31
32
  if (existsSync(path)) {
32
- return path
33
+ return normalizePath(path)
33
34
  }
34
35
  const withDir = resolve(directory, filesToTry[ix])
35
36
  if (existsSync(withDir)) {
36
- return withDir
37
+ return normalizePath(withDir)
37
38
  }
38
39
  }
39
- return resolve(directory, file)
40
+
41
+ return normalizePath(resolve(directory, file))
40
42
  }
41
43
 
42
44
  const pluckIncludes = (tokens) => {