File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function vitePluginCesium(
2323 const cesiumBuildRootPath = 'node_modules/cesium/Build' ;
2424 const cesiumBuildPath = 'node_modules/cesium/Build/Cesium/' ;
2525
26- let CESIUM_BASE_URL = '/ cesium/' ;
26+ let CESIUM_BASE_URL = 'cesium/' ;
2727 let outDir = 'dist' ;
2828 let base : string = '/' ;
2929 let isBuild : boolean = false ;
@@ -78,7 +78,7 @@ function vitePluginCesium(
7878
7979 configureServer ( { middlewares } ) {
8080 const cesiumPath = path . join ( cesiumBuildRootPath , devMinifyCesium ? 'Cesium' : 'CesiumUnminified' ) ;
81- middlewares . use ( CESIUM_BASE_URL , serveStatic ( cesiumPath ) ) ;
81+ middlewares . use ( path . join ( '/' , CESIUM_BASE_URL ) , serveStatic ( cesiumPath ) ) ;
8282 } ,
8383
8484 async closeBundle ( ) {
@@ -103,15 +103,15 @@ function vitePluginCesium(
103103 tag : 'link' ,
104104 attrs : {
105105 rel : 'stylesheet' ,
106- href : base + normalizePath ( path . join ( CESIUM_BASE_URL , 'Widgets/widgets.css' ) )
106+ href : normalizePath ( path . join ( CESIUM_BASE_URL , 'Widgets/widgets.css' ) ) ,
107107 }
108108 }
109109 ] ;
110110 if ( isBuild && ! rebuildCesium ) {
111111 tags . push ( {
112112 tag : 'script' ,
113113 attrs : {
114- src : base + normalizePath ( path . join ( CESIUM_BASE_URL , 'Cesium.js' ) )
114+ src : normalizePath ( path . join ( CESIUM_BASE_URL , 'Cesium.js' ) ) ,
115115 }
116116 } ) ;
117117 }
You can’t perform that action at this time.
0 commit comments