Open remcohaszing opened 7 years ago
As someone who uses Cordova to build web apps, I'm pretty opposed to anything that requires my app code to know that Cordova exists. I'm building apps for the web, Cordova is just a packaging tool and polyfill loader (in the form of plugins). My app should not know or care that it's running in Cordova.
Currently Cordova requires the app to include <script src="cordova.js"></script>
in the index page, which is slightly annoying but easy enough to workaround with a empty cordova.js file for web.
Plugins can already require node modules using npm via their package.json files if Cordova is run with the --browserify
option (which I believe is default now?)
@dpogue browserify
is not default.
I'd love to see better integration with module bundlers, such as webpack.
I think I figured out the global steps of what needs to be done for this.
I might be missing a lot of details, because I'm not that familiar with Cordova internals.