Skip to content

Commit ac9e9b5

Browse files
committed
[Vue][React][Svelte] Fix controllers assets compilation on Windows server
1 parent 59cb869 commit ac9e9b5

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/React/src/AssetMapper/ReactControllerLoaderAssetCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function compile(string $content, MappedAsset $asset, AssetMapperInterfac
5757
$controllerNameForVariable,
5858
$relativeImportPath
5959
);
60-
$componentParts[] = \sprintf('"%s": %s', $name, $controllerNameForVariable);
60+
$componentParts[] = \sprintf('"%s": %s', Path::normalize($name), $controllerNameForVariable);
6161
}
6262

6363
$importCode = implode("\n", $importLines);

src/Svelte/src/AssetMapper/SvelteControllerLoaderAssetCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function compile(string $content, MappedAsset $asset, AssetMapperInterfac
5757
$controllerNameForVariable,
5858
$relativeImportPath
5959
);
60-
$componentParts[] = \sprintf('"%s": %s', $name, $controllerNameForVariable);
60+
$componentParts[] = \sprintf('"%s": %s', Path::normalize($name), $controllerNameForVariable);
6161
}
6262

6363
$importCode = implode("\n", $importLines);

src/Vue/src/AssetMapper/VueControllerLoaderAssetCompiler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function compile(string $content, MappedAsset $asset, AssetMapperInterfac
5757
$controllerNameForVariable,
5858
$relativeImportPath
5959
);
60-
$componentParts[] = \sprintf('"%s": %s', $name, $controllerNameForVariable);
60+
$componentParts[] = \sprintf('"%s": %s', Path::normalize($name), $controllerNameForVariable);
6161
}
6262

6363
$importCode = implode("\n", $importLines);

0 commit comments

Comments
 (0)