Skip to content

Commit

Permalink
Merge pull request #3 from CesiumGS/remove-externals
Browse files Browse the repository at this point in the history
Remove node externals
  • Loading branch information
ggetz authored Feb 2, 2024
2 parents 65cb8e9 + a33727e commit 98180b8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
Empty file modified .husky/pre-commit
100644 → 100755
Empty file.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,20 @@ import "cesium/Build/Cesium/Widgets/widgets.css";
import "@cesium/engine/Source/Widget/CesiumWidget.css";
```

## CesiumJS before version `1.114`

If you are using a version of CesiumJS before `1.114` you will need to modify the config to tell it to ignore some external node dependencies. Add the `build` section below:

```js
build: {
rollupOptions: {
external: ["http", "https", "url", "zlib"],
},
},
```

See cesium PR [#11773](https://github.com/CesiumGS/cesium/pull/11773) for more information

## Contributions

Pull requests are appreciated. Please use the same [Contributor License Agreement (CLA)](https://github.com/CesiumGS/cesium/blob/master/CONTRIBUTING.md) used for [Cesium](https://cesium.com/).
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vite-plugin-static-copy": "^1.0.0"
},
"dependencies": {
"cesium": "^1.113.0"
"cesium": "^1.114.0"
},
"lint-staged": {
"*.{js,html}": [
Expand Down
5 changes: 0 additions & 5 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,4 @@ export default defineConfig({
],
}),
],
build: {
rollupOptions: {
external: ["http", "https", "url", "zlib"],
},
},
});

0 comments on commit 98180b8

Please sign in to comment.