Skip to content

Commit

Permalink
Merge pull request #46 from jfayot/fix_root_not_taken_into_account
Browse files Browse the repository at this point in the history
fix: vite root directory not taken into account when set
  • Loading branch information
nshen authored Dec 2, 2023
2 parents f52a8ef + ca44724 commit 36d50c2
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 36d50c2

Please sign in to comment.