Comments (6)
Ok understood. I see that something like webpack makes sense, I thought I will loose ability to properly debug this thing when using webpack but I will give it a try.
For now what works is that I built harp.gl with target for esnext import it as usual but then remove the import as a post build step and replace it by referencing the bundled version. This way I can use the typed version during development and the bundled during run-time.
A little bit hacky but good for now. So this has no high priority as it works quite well.
Thank you again for this neat library.
from harp.gl.
@ReeRichard , thanks for creating this issue, I see that @CraigBerlin has created an internal issue on our side. We will prioritize and hopefully we can get someone to look into it soon!
from harp.gl.
@ReeRichard Could you please tell what exactly doesn't work for you?
In particular, how do you bundle, what is your tsconfig.json
?
(Repo with minimal repro would be awesome).
I am not aware of any fundamental problems that make our packages incompatible with TS esnext
target.
from harp.gl.
Hi, thank you for your support.
I probably confuse some things here since I'm pretty new to Typescript/Module Resolution Ecosystem. The problem is more about how java script is loaded/included. I use Lit-element as the main system for rendering components. And every module is loaded through import * as XY from Z
instead of the require(filename)
that is found anywhere in the harp.gl code and transpiled version. The require
method is not supposed to work anymore as it looks like with the latest target such as esnext?
This is how my tsconfig.json looks like
{
"compileOnSave": true,
"compilerOptions": {
"baseUrl": "../",
"declaration": true,
"rootDir": "./",
"outDir": "../build",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"alwaysStrict": true,
"allowJs": false,
"strictBindCallApply": true,
"strictFunctionTypes": true,
"strictPropertyInitialization": true,
"strictNullChecks": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noFallthroughCasesInSwitch": true,
"noImplicitAny": true,
"noImplicitReturns": true,
"noUnusedLocals": true,
"noImplicitThis": true,
"noUnusedParameters": false,
"removeComments": false,
"skipLibCheck": true,
"preserveConstEnums": true,
"sourceMap": true,
"pretty": true,
"lib": [
"esnext",
"dom"
]
},
"include": [
"../src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
from harp.gl.
require(filename) that is found anywhere in the harp.gl code
Yeah, just as I've expected. Yes, we have few require
leftovers caused by problems with build environment, hopefully we can fix them soon.
Until now, the only workaround is to bundle our code with webpack which support mixed require
& import
in sources or use harp.js
in already bundled form - https://github.com/heremaps/harp.gl/tree/master/%40here/harp.gl, but this has some disadvantages like lack of typings.
require
method not supposed to work anymore as it looks like with the latest target such as esnext?
It never worked directly, it was just bundler responsibility to handle this function in special way. I assume that you don't use any bundler, that's why you encounter problems. It's just our fault that some of use assumed that everyone uses bundler and that it's webpack :)
from harp.gl.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from harp.gl.
Related Issues (20)
- Give 3D buildings that have 0m height data a random height between 2 values HOT 2
- Load building height data from different sources and combining with Here Maps (ex. Open Street Maps - OSM) HOT 2
- Allow CirclesTechnique points size to be specified in metres and pixels HOT 1
- MapView: Failed to connect to geojson: Error during worker initialization HOT 7
- Getting Started Guide is broken HOT 9
- Some countries has no shaped data at all HOT 2
- Maintaining "North up" in Spherical Map HOT 3
- big polygon broken in some level? HOT 2
- Optimisation possible for rendering. Only evaluate expressions for items which are in viewport. HOT 1
- Can I use anotherdata server? HOT 2
- Drawing exception problem HOT 4
- [feature] time-based tools HOT 3
- Equirectangular Tiles supported? HOT 3
- reactjs examples that work with current version of Harp HOT 8
- GeoJson is not being extruded. HOT 2
- Heatmap example is blank HOT 5
- Uncaught ReferenceError: THREE is not defined HOT 8
- Help with custom shader water layer HOT 4
- Docs and online examples is 404 HOT 3
- Do existing harp.gl users need to make any changes to match the new change? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from harp.gl.