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

How to use it on ionic existing project #4

Closed
jpujol880807 opened this issue Jan 12, 2018 · 3 comments
Closed

How to use it on ionic existing project #4

jpujol880807 opened this issue Jan 12, 2018 · 3 comments

Comments

@jpujol880807
Copy link

jpujol880807 commented Jan 12, 2018

I have this configuration
ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
Node: 6.11.5
Npm: 3.10.10
System: Windows 10
I'm trying to use the npm package on existing project and it works well on the browser, but it doesn't render the map on android devices, i'm missing some step to make it work?
I added
import 'promise-polyfill';
import 'whatwg-fetch';
and installed them with npm

@0nza1101
Copy link
Owner

0nza1101 commented Jan 12, 2018

Hello,
I tested the sample with your configuration seems working without --prod to ionic cordova build android. I will investigate on this issue.

EDIT: I found the problem, the npm packages that I made were using sql.js 0.4.0 I updated it to 0.5.0 but another bug came from this version webpack was throwing a heap out of memory error when building with --prod so I found a fix, this issue is related to webpack/ionic-app-script : https://github.com/ionic-team/ionic-app-scripts/issues/1036.

I prefer adding "config": { "ionic_source_map_type": "cheap-source-map" } to the package.json than using node --max-old-space-size=8192 in every build.

In definitive update the npm package npm i leaflet-tilelayer-mbtiles-ts@latest and add :
"config": { "ionic_source_map_type": "cheap-source-map" }, to your package.json

@jpujol880807
Copy link
Author

thanks i wil try the solution, and let you know if it's working

@JeongJun-Lee
Copy link

When I added it manually, it works well at iOS Simulator. But it doesn't work at real Android device like issue #6 . How about you, @jpujol880807 ?

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

3 participants