cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CB-11311) cordova-plugin-wkwebview-engine not working with --browserify flag
Date Thu, 27 Jul 2017 03:05:00 GMT

    [ https://issues.apache.org/jira/browse/CB-11311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16102633#comment-16102633
] 

Shazron Abdullah edited comment on CB-11311 at 7/27/17 3:04 AM:
----------------------------------------------------------------

[~stevegill] any opinion? what is browserify's status w.r.t cordova currently

[~sgopisetti] you found the source of the issue. Currently the bridge for the UIWebView engine
is baked into cordova-js, thus it already exists thus needs to be removed first when using
browserify and wkwebview engine

We could either in the future:
1. Extract the UIWebView engine and make it a required plugin, make it default (I don't like
this)
2. Make WKWebViewEngine the default

Right now option 2 has some issues.


was (Author: shazron):
[~stevegill] any opinion? what is browserify's status w.r.t cordova currently

[~sgopisetti] you found the source of the issue. Currently the bridge for the UIWebView engine
is baked into cordova-js, thus it already exists thus needs to be removed first when using
browserify.

We could either in the future:
1. Extract the UIWebView engine and make it a required plugin, make it default (I don't like
this)
2. Make WKWebViewEngine the default

Right now option 2 has some issues.

> cordova-plugin-wkwebview-engine not working with --browserify flag
> ------------------------------------------------------------------
>
>                 Key: CB-11311
>                 URL: https://issues.apache.org/jira/browse/CB-11311
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-wkwebview-engine
>    Affects Versions: 4.1.1
>         Environment: OS X 10.11
> Cordova CLI 6.1.1
> Cordova iOS 4.1.1
> cordova-plugin-wkwebview-engine 1.0.3
>            Reporter: Wilson Yang
>
> The code below for replace the exec bridge is not compatible with browserify
> {code:javascript}
> // unregister the old bridge
> cordova.define.remove('cordova/exec');
> // redefine bridge to our new bridge
> cordova.define("cordova/exec", function(require, exports, module) {
>   module.exports = execProxy;
> });
> {code}
> After using browserify flag, all scripts for www will be packed into cordova.js as single
file. At the same time, the `cordova.define` become undefined.
> {code}
> TypeError: undefined is not an object (evaluating 'cordova.define.remove')
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message