caiobiodere / cordova-template-framework7-vue-webpack

Framework7 - Vue - Webpack Cordova Template with Webpack Dev Server and Hot Module Replacement
Apache License 2.0
621 stars 154 forks source link

cordova build ios --release bug #168

Closed VisualMafia closed 5 years ago

VisualMafia commented 5 years ago

If used cordova build ios --release The application is building, running, but not working. In the log, I see that there is no Cordova. Is it all or just me? The latest version of the template

exception nativeEvalAndFetch : ReferenceError: Can't find variable: cordova

caiobiodere commented 5 years ago

@VisualMafia I've fixed your issue the problem was happening because Cordova js main file is supposed to be in index.html file for release and development environments, please include this plugin to your release web pack config file:

const CordovaHtmlOutputPlugin = require('../webpack/plugins/CordovaHtmlOutputPlugin.js'); new CordovaHtmlOutputPlugin()

If you want to make sure that you are doing right check this commit before doing it: https://github.com/caiobiodere/cordova-template-framework7-vue-webpack/commit/0f769825f6c9edb44754c1493923869bf6b8a365

VisualMafia commented 5 years ago

Working, thanks