Skip to content

cesium 1.85.0 breaks due to zip.js without @open-wc/webpack-import-meta-loader #6

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

Closed
meschg opened this issue Sep 21, 2021 · 3 comments
Assignees

Comments

@meschg
Copy link
Owner

meschg commented Sep 21, 2021

Failed to compile.

./node_modules/cesium/Source/ThirdParty/zip.js 1565:71
Module parse failed: Unexpected token (1565:71)
File was processed with these loaders:
 * ./node_modules/strip-pragma-loader/index.js
You may need an additional loader to handle the result of these loaders.
| 	if (!workerData.interface) {
| 		try {
> 			workerData.worker = new Worker(new URL(workerData.scripts[0], import.meta.url));
| 		} catch (error) {
| 			workerData.worker = new Worker(new URL(workerData.scripts[0], import.meta.url), { type: "module" });

Problem reported to cesium team:

Todos/Workaround:

  • Try workaround and report back to team
@meschg meschg self-assigned this Sep 21, 2021
@meschg
Copy link
Owner Author

meschg commented Sep 21, 2021

Workaround

  1. to build cesium with the changes
  2. place build in /node_modules/cesium/

from cesium 9790 leads to new error:

[./src/main.ts] 983 bytes {app} [built]
    + 1844 hidden modules

ERROR in ./node_modules/cesium/Source/ThirdParty/zip.js 6357:57
Module parse failed: Unexpected token (6357:57)
File was processed with these loaders:
 * ./node_modules/strip-pragma-loader/index.js
You may need an additional loader to handle the result of these loaders.
| 
|       function getWorker(options = {}) {
>               return new Worker(new URL(workerData.scripts[0], import.meta.url), options);
|       }
| 
 @ ./node_modules/cesium/Source/DataSources/KmlDataSource.js 44:0-39 394:32-35 406:32-35 3168:19-22 3168:37-40
 @ ./node_modules/cesium/Source/
Widgets/Viewer/viewerDragDropMixin.js
 @ ./node_modules/cesium/Source/Cesium.js
 @ ./src/plugins/cesium.ts
 @ ./src/store/storeCesium.ts
 @ ./src/store/store.ts
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://192.168.178.70:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts
Child html-webpack-plugin for "index.html":
         Asset      Size  Chunks  Chunk Names
    index.html  1.37 MiB   

@meschg meschg changed the title cesium 1.85.0 breaks due to missing zip.js cesium 1.85.0 breaks due to zip.js Sep 21, 2021
meschg added a commit that referenced this issue Sep 21, 2021
@meschg
Copy link
Owner Author

meschg commented Sep 21, 2021

merged to master and now wait to see if
@open-wc/webpack-import-meta-loader is still required in cesium 1.86.0 or further
Thanks @puxiao :)

@meschg meschg changed the title cesium 1.85.0 breaks due to zip.js cesium 1.85.0 breaks due to zip.js without @open-wc/webpack-import-meta-loader Sep 21, 2021
@meschg
Copy link
Owner Author

meschg commented Jan 15, 2022

Closed because of migration to vite and using https://github.com/nshen/vite-plugin-cesium

@meschg meschg closed this as completed Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant