fix: build.outDir is relative to root in vite
This commit is contained in:
@@ -33,7 +33,6 @@ function vitePluginCesium(
|
|||||||
|
|
||||||
config(c, { command }) {
|
config(c, { command }) {
|
||||||
isBuild = command === 'build';
|
isBuild = command === 'build';
|
||||||
if (c.build?.outDir) outDir = c.build.outDir;
|
|
||||||
if (c.base) {
|
if (c.base) {
|
||||||
base = c.base;
|
base = c.base;
|
||||||
}
|
}
|
||||||
@@ -56,6 +55,10 @@ function vitePluginCesium(
|
|||||||
return userConfig;
|
return userConfig;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
configResolved(resolvedConfig) {
|
||||||
|
outDir = path.join(resolvedConfig.root, resolvedConfig.build.outDir);
|
||||||
|
},
|
||||||
|
|
||||||
async load(id: string) {
|
async load(id: string) {
|
||||||
if (!rebuildCesium) return null;
|
if (!rebuildCesium) return null;
|
||||||
// replace CESIUM_BASE_URL variable in 'cesium/Source/Core/buildModuleUrl.js'
|
// replace CESIUM_BASE_URL variable in 'cesium/Source/Core/buildModuleUrl.js'
|
||||||
|
Reference in New Issue
Block a user