Git Product home page Git Product logo

Comments (3)

liberostelios avatar liberostelios commented on July 18, 2024

Hi @hopezh,

I am not entirely sure what's wrong here. I am assuming webpack is doing things differently than parcel.js and something is broken regarding imports.

Would you mind sharing your webpack config? Or even the whole project?

from cityjson-threejs-loader.

hopezh avatar hopezh commented on July 18, 2024

Thank you, @liberostelios

Unfortunately, the project files (web dev files and CityJSON data files) are confidential, and I'm unable to post it here.

The three webpack related config files in the "bundler" folder are attached here for your reference.

webpack_config_files.zip

from cityjson-threejs-loader.

liberostelios avatar liberostelios commented on July 18, 2024

I think this is because your webpack configuration doesn't play well with the hybrid (and, I have to admit, a bit sloppy 😊) import of TypeScript and JavaScript files used.

Since I am not able to reproduce the issue, I'd like ask your help. Here is an hacky way to figure out if this is the case:

  1. Open file node_modules/cityjson-threejs-loader/src/parsers/CityJSONWorkerParser.js.
  2. Replace line 3 to: import { POINTS, LINES, TRIANGLES } from './geometry/GeometryData';

It might fail again, but the error message should complain about other modules not included (my assumption is that it will complain about TriangleParser).

If that's the case, there are two ways to resolve this:

  1. You can try to fix it on your end by making the webpack work with TypeScript modules (I am no webpack expert, so I can't help with that).
  2. I can try to fix on my end by including only the JavaScript files and release a fix for it. It might take a bit longer and since I can't reproduce the problem, you might still find more issues.

If you are on a hurry, you can keep doing this for all import lines in the code for which the code complains, until I fix it on my end. But this isn't a proper solution.

Let me know what you get and we see.

from cityjson-threejs-loader.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.