{"id":16024603,"url":"https://github.com/srothst1/cesiumjs-webpack-starter-tutorial","last_synced_at":"2025-04-05T04:19:54.318Z","repository":{"id":136792696,"uuid":"395439653","full_name":"srothst1/cesiumjs-webpack-starter-tutorial","owner":"srothst1","description":"CesiumJS is an open source JS library for creating 3D globes and maps. Webpack is a popular tool for bundling JS modules. This repository showcases how CesiumJS and webpack can be used together.","archived":false,"fork":false,"pushed_at":"2021-10-14T18:15:37.000Z","size":55360,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T12:21:15.299Z","etag":null,"topics":["cesiumjs","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srothst1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-12T20:45:26.000Z","updated_at":"2021-10-14T18:15:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"e1286a48-d68b-429a-8cbc-acbef8045386","html_url":"https://github.com/srothst1/cesiumjs-webpack-starter-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srothst1%2Fcesiumjs-webpack-starter-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srothst1%2Fcesiumjs-webpack-starter-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srothst1%2Fcesiumjs-webpack-starter-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srothst1%2Fcesiumjs-webpack-starter-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srothst1","download_url":"https://codeload.github.com/srothst1/cesiumjs-webpack-starter-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247285871,"owners_count":20913889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cesiumjs","webpack"],"created_at":"2024-10-08T19:22:11.258Z","updated_at":"2025-04-05T04:19:54.291Z","avatar_url":"https://github.com/srothst1.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cesium-webpack-example\n\nA minimal recommended setup for an applications using [Cesium](https://cesium.com) with [Webpack](https://webpack.js.org/concepts/).\n\n[![Build Status](https://travis-ci.org/AnalyticalGraphicsInc/cesium-webpack-example.svg?branch=using-custom-loader)](https://travis-ci.org/AnalyticalGraphicsInc/cesium-webpack-example)\n\n### Running this application\n\n\tnpm install\n\tnpm start\n\nNavigate to `localhost:8080`.\n\n##### Available scripts\n\n* `npm start` - Runs a webpack build with `webpack.config.js` and starts a development server\n* `npm run build` - Runs a webpack build with `webpack.config.js`\n* `npm run release` - Runs an optimized webpack build with `webpack.release.config.js`\n* `npm run serve-release` - Runs an optimized webpack build with `webpack.release.config.js` and starts a development server\n\n##### Configurations\n\nWe've included two webpack configuration files in this repository. `webpack.config.js` contains configuration for development while `webpack.release.config.js` contains an optimized configuration for production use.\n\n### Requiring Cesium in your application\n\nWe recommend using Cesium as an [ES6](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) module, via the `import` keyword.\n\n#### Import named modules from Cesium\n\n\timport { Color } from 'cesium';\n\tvar c = Color.fromRandom();\n\n#### Import Cesium static asset files\n\t\n\timport \"cesium/Build/Cesium/Widgets/widgets.css\";\n\n### Treeshaking\n\n`webpack.release.config.js` enables tree-shaking of CesiumJS modules so that unused modules are not included in the production bundle. See Webpack's [Tree Shaking](https://webpack.js.org/guides/tree-shaking/) documentation for more details.\n\n##### Removing pragmas\n\nTo remove pragmas such as a traditional Cesium release build, use the [`strip-pragma-loader`](https://www.npmjs.com/package/strip-pragma-loader).\n\nInstall the plugin with npm,\n\n```\nnpm install strip-pragma-loader --save-dev\n```\n\nand include the loader in `module.rules` with `debug` set to `false`.\n\n```\nrules: [{\n\ttest: /\\.js$/,\n\tenforce: 'pre',\n\tinclude: path.resolve(__dirname, cesiumSource),\n\tuse: [{\n\t\tloader: 'strip-pragma-loader',\n\t\toptions: {\n\t\t    pragmas: {\n\t\t\t\tdebug: false\n\t\t\t}\n\t\t}\n\t}]\n}]\n```\n\n## Contributions\n\nPull requests are appreciated. Please use the same [Contributor License Agreement (CLA)](https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CONTRIBUTING.md) used for [Cesium](https://cesiumjs.org/).\n\n---\n\nDeveloped by the Cesium team.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrothst1%2Fcesiumjs-webpack-starter-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrothst1%2Fcesiumjs-webpack-starter-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrothst1%2Fcesiumjs-webpack-starter-tutorial/lists"}