You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{defineConfig}from'vite'import{viteStaticCopy}from'vite-plugin-static-copy'constcesiumSource="node_modules/cesium/Build/Cesium";// This is the base url for static files that CesiumJS needs to load.// Set to an empty string to place the files at the site's root pathconstcesiumBaseUrl="cesiumStatic";// https://vite.dev/config/exportdefaultdefineConfig({define: {// Define relative base path in cesium for loading assets// https://vitejs.dev/config/shared-options.html#defineCESIUM_BASE_URL: JSON.stringify(`/${cesiumBaseUrl}`),},plugins: [// Copy Cesium Assets, Widgets, and Workers to a static directory.// If you need to add your own static files to your project, use the `public` directory// and other options listed here: https://vitejs.dev/guide/assets.html#the-public-directoryviteStaticCopy({targets: [{src: `${cesiumSource}/ThirdParty`,dest: cesiumBaseUrl},{src: `${cesiumSource}/Workers`,dest: cesiumBaseUrl},{src: `${cesiumSource}/Assets`,dest: cesiumBaseUrl},{src: `${cesiumSource}/Widgets`,dest: cesiumBaseUrl},],}),],})
The text was updated successfully, but these errors were encountered:
配置
vite.config.ts
The text was updated successfully, but these errors were encountered: