Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cesium no longer working with Webpack [Outdated Approach] #11301

Closed
oussamabonnor1 opened this issue May 22, 2023 · 19 comments
Closed

Cesium no longer working with Webpack [Outdated Approach] #11301

oussamabonnor1 opened this issue May 22, 2023 · 19 comments

Comments

@oussamabonnor1
Copy link
Contributor

This blog was very helpful to setup what we needed from Cesium on a Nuxt/Vue project using copy-webpack-plugin

  • Browser:
    Chrome 113.0.5672.127 | 64 bit
  • Operating System:
    Windows 10 Version 21H2 (OS Build 19044.2965)
@TJKoury
Copy link
Contributor

TJKoury commented May 24, 2023

#11306 (comment)

@ggetz
Copy link
Contributor

ggetz commented May 26, 2023

Thanks @oussamabonnor1. More recently, we've been "maintaining" cesium-webpack-example, but it can certainly use a refresh.

@ggetz ggetz added category - doc good first issue An opportunity for first time contributors labels May 26, 2023
@ggetz
Copy link
Contributor

ggetz commented May 26, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

@ggetz ggetz added onramping and removed good first issue An opportunity for first time contributors labels May 26, 2023
@oussamabonnor1
Copy link
Contributor Author

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

@bbhxwl
Copy link

bbhxwl commented Oct 22, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@oussamabonnor1
Copy link
Contributor Author

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files
Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).

My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

@bbhxwl
Copy link

bbhxwl commented Oct 24, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).

My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

@oussamabonnor1
Copy link
Contributor Author

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).
My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

1.92 works fine! It just has less features than the newest available version. You can use it with Nuxt2.

@bbhxwl
Copy link

bbhxwl commented Oct 25, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).
My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

1.92 works fine! It just has less features than the newest available version. You can use it with Nuxt2.

What features are missing? I want to see if I need them and if there are any explanations? If using CDN references, you can use the latest version, right?

@oussamabonnor1
Copy link
Contributor Author

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).
My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

1.92 works fine! It just has less features than the newest available version. You can use it with Nuxt2.

What features are missing? I want to see if I need them and if there are any explanations? If using CDN references, you can use the latest version, right?

What features are missing => check the change.log for a complete list.
Can a CDN approach work => I never tested it but it sounds like it wont since the compilation/imports will just be replaced from being fetched locally to being fetched via a request. I recommend you test it and see :)

Good luck!

@bbhxwl
Copy link

bbhxwl commented Oct 25, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).
My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

1.92 works fine! It just has less features than the newest available version. You can use it with Nuxt2.

What features are missing? I want to see if I need them and if there are any explanations? If using CDN references, you can use the latest version, right?

What features are missing => check the change.log for a complete list. Can a CDN approach work => I never tested it but it sounds like it wont since the compilation/imports will just be replaced from being fetched locally to being fetched via a request. I recommend you test it and see :)

Good luck!

So it seems like I should upgrade my project. I'll try using nuxt3, can I use the latest one?

@oussamabonnor1
Copy link
Contributor Author

So it seems like I should upgrade my project. I'll try using nuxt3, can I use the latest one?

With Nuxt3. Yes!

@bbhxwl
Copy link

bbhxwl commented Oct 25, 2023

So it seems like I should upgrade my project. I'll try using nuxt3, can I use the latest one?

With Nuxt3. Yes!

Do you have the correct method for loading maps with nuxt3? Ts

#11586

@bbhxwl
Copy link

bbhxwl commented Nov 11, 2023

Thanks @oussamabonnor1. More recently, we've been "maintaining" cesium-webpack-example, but it can certainly use a refresh.

Is it possible to use the latest version of cesium with nuxt2+webpack4?

@bbhxwl
Copy link

bbhxwl commented Nov 11, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).
My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

Is there any bug in 1.92? My project currently does not support upgrading to nuxt3, so can't I have a better experience with cesium?

1.92 works fine! It just has less features than the newest available version. You can use it with Nuxt2.

Can we consider how to be compatible with the latest version? Because upgrading to nuxt3 is too challenging for me.

@bbhxwl
Copy link

bbhxwl commented Nov 11, 2023

Also, based on your title, can you provide more information on what makes this an outdated approach? Is it just that it's not working as-is, or does it go deeper?

Sorry @ggetz , I meant it's not working as-is. Using copy-webpack-plugin (or a similar approach) would be great if it's still an option on the table.

How should nuxt2 use cesium? I urgently need this feature.

@bbhxwl Nuxt2 will only work with Cesium 1.92 and older using this approach https://cesium.com/learn/cesiumjs-learn/cesiumjs-webpack/#manage-cesiumjs-static-files Anything newer than the 1.92 version will have to use a different approach (Nuxt3 or Webpack5 or...).

My package.json's dependencies section has these:

"cesium": "1.92",
"copy-webpack-plugin": "6",

Good luck! 💪

image
image
image

@bbhxwl
Copy link

bbhxwl commented Nov 12, 2023

So it seems like I should upgrade my project. I'll try using nuxt3, can I use the latest one?

With Nuxt3. Yes!

I have a question to consult here.

https://community.cesium.com/t/cesium-ion-1-110-webpack-problem/27351

@ggetz
Copy link
Contributor

ggetz commented Jan 9, 2024

I'm going to close this as https://github.com/CesiumGS/cesium-webpack-example has been updated and is working with Webpack 5.

We are investigating wether we should provide an example of Webpack 4, specifically for use with Nuxt 2. However, given that Nuxt 2 will soon be end of life in June.

@ggetz ggetz closed this as completed Jan 9, 2024
@ggetz
Copy link
Contributor

ggetz commented Jan 9, 2024

Also see #11306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants