markmarijnissen / webpack-cordova-plugin

Output webpack to a Cordova app.
65 stars 20 forks source link

A little help #1

Open jaime-ez opened 9 years ago

jaime-ez commented 9 years ago

Hi Mark,

I'm new to cordova and I need to connect to a web service that uses webpack. How should I proceed in order to have webpack enabled on my cordova app?...could you give some steps for deployment of your plugin?

Thanks!

markmarijnissen commented 9 years ago

It seems you have some terms mixed up.

A web service can't run on webpack, webpack only bundles your source code (JS, CSS, Html, but also Coffeescript, etc) to a bunch of (optimimized) files for your browser. So perhaps you have the source code of a web service that is bundled using webpack?

In any case, assuming you have Cordova installed and a webpack plugin, you can this plugin to your config and simply run webpack.

The plugin wil create the required directories and config.xml file for a Cordova project. From there, simply use Cordova to add a platform, build and run an app.

This might be a little to vague for you. Take a look at my "famous-webpack-seed". It is an seed project with detailed instructions to get you up and running. Having done that, I'm sure you can repeat the steps for your own project.

Also, webpack and Cordova have both good documentation in their website and I the cli!

markmarijnissen commented 9 years ago

If things are unclear, I can provide the best help if you tell me at which step of the seed project you are stuck, or more details about what you are trying to do

jaime-ez commented 9 years ago

Hi Mark, AS soon as I wrote the issue I realized that I was mixed up! I will check the famous-webapp-seed and see how it goes... thanks a lot for your answer!

enshuti commented 8 years ago

Hi Mark , I could use a little help as I'm trying to follow the guide for outputting web pack to a cordova app. I'm getting stuck at the step where I need to include the webpack-cordova-plugin in the config.xml. Furthermore I can't understand what you mean by what you explain in the 1. step of Load Cordova . Where should I be copying this to: require('file?name=index.html!./index.html'); ?