Skip to content

Commit

Permalink
normalize compilableFiles key
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Feb 23, 2024
1 parent a10c85e commit f147317
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ async function compileProject(addWatchFile, logger, state, config) {
);
state.projectOptions.sourceFiles.forEach((file) => {
addWatchFile(file);
state.compilableFiles.set(file, compiledFSharpFiles[file]);
const normalizedFileName = normalizePath(file);
state.compilableFiles.set(normalizedFileName, compiledFSharpFiles[file]);
});
}

Expand Down Expand Up @@ -379,11 +380,12 @@ export default function fablePlugin(userConfig) {
logDiagnostics(logger, diagnostics);
const loadPromises = Object.keys(compiledFSharpFiles).map(
(fsFile) => {
const normalizedFileName = normalizePath(fsFile);
state.compilableFiles.set(
fsFile,
normalizedFileName,
compiledFSharpFiles[fsFile],
);
return this.load({ id: fsFile });
return this.load({ id: normalizedFileName });
},
);
await Promise.all(loadPromises);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vite-plugin-fable",
"version": "0.0.14",
"version": "0.0.15",
"homepage": "https://nojaf.com/vite-plugin-fable/",
"description": "",
"main": "index.js",
Expand Down

0 comments on commit f147317

Please sign in to comment.