s3xysteak / vite-plugin-cesium-build

A devDependencies used to automatically configure CesiumJS for development and build with Vite.
MIT License
18 stars 2 forks source link

Webpack Alternative #5

Closed ProkhorKondratev closed 11 months ago

ProkhorKondratev commented 11 months ago

Great job! It works flawlessly in vite! Do you have the right competencies to repeat this for WebPack? It would be great to have both implementations. Thanks

s3xysteak commented 11 months ago

Unfortunately, there is currently no such plan, as indicated by the name of this plugin, vite-plugin-cesium-build. It is a plugin specifically designed for Vite. If you simply want to develop and build Cesium with webpack, you can refer to the official documentation provided by Cesium, such as their official repository.
The example provided in the repository can help you achieve normal development and building of Cesium with webpack, but it may not yield optimal results. To achieve the effect of this plugin vite-plugin-cesium-build, you would also need to:

  1. Copy Cesium.js. Try the same way in their official repository.
  2. Externalize Cesium. See Webpack Doc
  3. Properly include Cesium.js in index.html.
  4. Properly set CESIUM_BASE_URL

Good luck!