🚀 v1.2.9 fixed #7
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vite-plugin-cesium",
|
"name": "vite-plugin-cesium",
|
||||||
"version": "1.2.7",
|
"version": "1.2.9",
|
||||||
"description": "Cesium library plugin for Vite",
|
"description": "Cesium library plugin for Vite",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
@@ -2,7 +2,7 @@ import fs from 'fs-extra';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import externalGlobals from 'rollup-plugin-external-globals';
|
import externalGlobals from 'rollup-plugin-external-globals';
|
||||||
import serveStatic from 'serve-static';
|
import serveStatic from 'serve-static';
|
||||||
import { HtmlTagDescriptor, Plugin, UserConfig } from 'vite';
|
import { HtmlTagDescriptor, normalizePath, Plugin, UserConfig } from 'vite';
|
||||||
|
|
||||||
interface VitePluginCesiumOptions {
|
interface VitePluginCesiumOptions {
|
||||||
/**
|
/**
|
||||||
@@ -116,14 +116,16 @@ function vitePluginCesium(
|
|||||||
tag: 'link',
|
tag: 'link',
|
||||||
attrs: {
|
attrs: {
|
||||||
rel: 'stylesheet',
|
rel: 'stylesheet',
|
||||||
href: path.join(CESIUM_BASE_URL, 'Widgets/widgets.css')
|
href: 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: path.join(base, 'cesium/Cesium.js') }
|
attrs: { src: normalizePath(path.join(base, 'cesium/Cesium.js')) }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return tags;
|
return tags;
|
||||||
|
Reference in New Issue
Block a user