Skip to content

Commit

Permalink
feat(cesium)!: Use iife of Cesium.js in dev to consistent with what…
Browse files Browse the repository at this point in the history
… after building.
  • Loading branch information
s3xysteak committed May 10, 2024
1 parent 2b8ce36 commit 3160359
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 43 deletions.
14 changes: 4 additions & 10 deletions demo/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"demo:dev": "cd demo && pnpm dev",
"demo:build": "cd demo && pnpm build",
"demo:preview": "cd demo && pnpm preview",
"dev": "pnpm build && esno ./scripts/buildDev.ts && pnpm demo:dev",
"dev": "pnpm build && pnpm demo:i && pnpm demo:dev",
"build": "tsc && unbuild",
"build-only": "unbuild",
"test": "vitest",
Expand Down
25 changes: 0 additions & 25 deletions scripts/buildDev.ts

This file was deleted.

7 changes: 1 addition & 6 deletions src/cesium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ function pluginEntry(pluginOptions?: Partial<BuildCesiumOptions>): Plugin[] {
const options = resolveOptions(pluginOptions, 'node_modules/cesium/Build/Cesium')

return [
viteExternalsPlugin(
{ cesium: 'Cesium' },
{
disableInServe: true,
},
),
viteExternalsPlugin({ cesium: 'Cesium' }),
...copyCesium(
options,
['Assets', 'ThirdParty', 'Widgets', 'Workers'],
Expand Down
1 change: 0 additions & 1 deletion src/core/importCesium.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function importCesium(options: BuildCesiumOptions): Plugin {

return {
name: 'vite-plugin-cesium-build:importCesium',
apply: 'build',
configResolved(resolvedConfig) {
base = resolvedConfig.base
},
Expand Down

0 comments on commit 3160359

Please sign in to comment.