Skip to content

Commit

Permalink
fix: vite root directory not taken into account when set
Browse files Browse the repository at this point in the history
  • Loading branch information
Jérôme Fayot committed May 12, 2023
1 parent 3fb46a5 commit ca44724
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default function vitePluginCesium(options: VitePluginCesiumOptions = {}):
if (base === '') base = './';
}
if (c.build?.outDir) {
outDir = c.build.outDir;
if (c.root !== undefined) {
outDir = path.join(c.root, c.build.outDir);
} else {
outDir = c.build.outDir;
}
}
CESIUM_BASE_URL = path.posix.join(base, CESIUM_BASE_URL);
const userConfig: UserConfig = {};
Expand Down

0 comments on commit ca44724

Please sign in to comment.