1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee

🚀 v1.2.9 fixed #7

This commit is contained in:
nshen
2021-09-13 10:58:25 +08:00
parent 741606e7c4
commit a1d763dd6e
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "vite-plugin-cesium",
"version": "1.2.7",
"version": "1.2.9",
"description": "Cesium library plugin for Vite",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@@ -2,7 +2,7 @@ import fs from 'fs-extra';
import path from 'path';
import externalGlobals from 'rollup-plugin-external-globals';
import serveStatic from 'serve-static';
import { HtmlTagDescriptor, Plugin, UserConfig } from 'vite';
import { HtmlTagDescriptor, normalizePath, Plugin, UserConfig } from 'vite';
interface VitePluginCesiumOptions {
/**
@@ -116,14 +116,16 @@ function vitePluginCesium(
tag: 'link',
attrs: {
rel: 'stylesheet',
href: path.join(CESIUM_BASE_URL, 'Widgets/widgets.css')
href: normalizePath(
path.join(CESIUM_BASE_URL, 'Widgets/widgets.css')
)
}
}
];
if (isBuild && !rebuildCesium) {
tags.push({
tag: 'script',
attrs: { src: path.join(base, 'cesium/Cesium.js') }
attrs: { src: normalizePath(path.join(base, 'cesium/Cesium.js')) }
});
}
return tags;