You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2022/04/25 07:57:55 UTC

[GitHub] [cordova] Ajju2211 opened a new issue, #327: Error in esbuild js bundle when loaded into the UI

Ajju2211 opened a new issue, #327:
URL: https://github.com/apache/cordova/issues/327

   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   I am getting error in the js bundle when loaded into the UI which is built from esbuild for my create-react-app.
   Previously I was using default create-react-app webpack build but for faster build time I am using esbuild.
   The error was due to this line.
   `user?.name?.verified`
   I think this was due to ES5 or ES6 support issue.
   Please le me know.
   And also which browser version is used in cordova.
   
   ### What does actually happen?
   
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [cordova] breautek closed issue #327: Error in esbuild js bundle when loaded into the UI

Posted by GitBox <gi...@apache.org>.
breautek closed issue #327: Error in esbuild js bundle when loaded into the UI
URL: https://github.com/apache/cordova/issues/327


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [cordova] breautek commented on issue #327: Error in esbuild js bundle when loaded into the UI

Posted by GitBox <gi...@apache.org>.
breautek commented on issue #327:
URL: https://github.com/apache/cordova/issues/327#issuecomment-1108533692

   > And also which browser version is used in cordova.
   
   Cordova uses the system webview. Cordova itself is not a browser engine and does not provide support for any ES features. Support for ES features relies purely on the underlying system browser engine. You can think of Cordova more like a packaging tool which packages your web assets into the native bundle.
   
   For Android, the webview is decoupled from the OS and the user can upgrade the webview through Google Play. The webview is usually based off of Chrome. This means a single device **could** have a wide range of versions installed. For example, Android 7 factory comes with Chrome 53, but can be updated to the current latest through Google Play. You can observe this if you install a Google Play enabled emulator in Android Studio.
   
   > The error was due to this line in js.
   user?.name?.verified
   I think this was due to ES5 or ES6 support issue.
   
   [Caniuse](https://caniuse.com/mdn-javascript_operators_optional_chaining) is an excellent resource to check for compatibility, but for the case of optional chaining syntax, you can see that support was added in Chrome fairly recently on Chrome 80 in the desktop version, but the `Android Browser` (aka the android webview), support for it prior to version 100 is actually unknown.
   
   So to reliably use optional chaining, you must provide a polyfill or a build-time transpile using tools such as babel. I think react projects automatically include babel if I recall correctly.
   
   For this reason I'm closing this as not a bug.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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