ionic-team / ionic-team/cordova-plugin-ionic-webview

Trying to use import modules using the plugin does not work - any way to get around this?

Open
#684 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
493
Forks
410
PR merge metrics
No merged PRs in 30d

Description

Hi,

I have been trying to no avail importing a module in a webview with cordova. This Particular library from chart IQ only use import statements and I cant get to work. On a browser all works fine.

Something like:

`

// This inline script acts as the entry point, without creating a separate external file.
// Reference a file of statically defined chart data.
//import sample5min from "chartiq/examples/data/STX_SAMPLE_5MIN.js";
// Reference the charting library.
import "chartiq/js/standard.js";
import "chartiq/js/addOns.js";
import { CIQ } from "chartiq/js/components.js";

Object.assign(globalThis, { CIQ });

// Instantiate a CIQ.ChartEngine object, the main object for creating charts.
window.stxx = new CIQ.ChartEngine({
container: document.querySelector(".chartContainer")
});
`

CIQ / stxx is not available in window no matter what I try. Anything Im missing with this plugin?

Using latest version of cordova ios 6.3

Thanks everyone!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.