fix: tags respect base path
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/index.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/index.ts
									
									
									
									
									
								
							@@ -121,16 +121,18 @@ function vitePluginCesium(
 | 
				
			|||||||
          tag: 'link',
 | 
					          tag: 'link',
 | 
				
			||||||
          attrs: {
 | 
					          attrs: {
 | 
				
			||||||
            rel: 'stylesheet',
 | 
					            rel: 'stylesheet',
 | 
				
			||||||
            href: normalizePath(
 | 
					            href:
 | 
				
			||||||
              path.join(CESIUM_BASE_URL, 'Widgets/widgets.css')
 | 
					              base +
 | 
				
			||||||
            )
 | 
					              normalizePath(path.join(CESIUM_BASE_URL, 'Widgets/widgets.css'))
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ];
 | 
					      ];
 | 
				
			||||||
      if (isBuild && !rebuildCesium) {
 | 
					      if (isBuild && !rebuildCesium) {
 | 
				
			||||||
        tags.push({
 | 
					        tags.push({
 | 
				
			||||||
          tag: 'script',
 | 
					          tag: 'script',
 | 
				
			||||||
          attrs: { src: normalizePath(path.join(base, 'cesium/Cesium.js')) }
 | 
					          attrs: {
 | 
				
			||||||
 | 
					            src: base + normalizePath(path.join(CESIUM_BASE_URL, 'Cesium.js'))
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      return tags;
 | 
					      return tags;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user