Skip to content

Commit 8804472

Browse files
committed
fix detection of project.xml to allow an id with backslashes
While the plugin always resolves with forward slashes, Rollup might give the initial project.xml backslashes (but Vite doesn't seem to)
1 parent ee364a5 commit 8804472

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vite-plugin-openfl.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default function openflPlugin() {
5151
config = resolvedConfig;
5252
},
5353
resolveId(source, importer) {
54-
if (!/\/project\.xml$/.test(importer)) {
54+
if (!/[\/\\]project\.xml$/.test(importer)) {
5555
return;
5656
}
5757

@@ -79,7 +79,7 @@ export default function openflPlugin() {
7979
}
8080
},
8181
transform(code, id, options) {
82-
if (!/\/project\.xml$/.test(id)) {
82+
if (!/[\/\\]project\.xml$/.test(id)) {
8383
return;
8484
}
8585

0 commit comments

Comments
 (0)