Whats the deal with webpack?


#1

Hi,
I just moved over from Ionic 1 to 2 and I’m struggling with Webpack.
Can someone explain why Ionic has moved from gulp over to webpack as I dont see the advantage I’ve never used Webpack so I dont get what all the fuse is about.

I couples of things I have not able to do with webpack:

  1. If i want to include a thirty-party library how do I do that? E.g. I installed Parse with npm install parse. How then did i include the JS files for the app build?
  2. The ionic webpack config strips the js sourcemaps. Is it possible to turn this back on? I guess they dont work with TS though…
  3. In my old ionic1 project I had two JS compile task. One for libraries files and one for app files. I did this because to much quicker to compile only the app js files when livereloading. Using webpack everything is all in one bundle, its pretty slow to compile the entire 2.8mb js each time you save. Any way to split this up?

thanks


#2

I have also same problem. I think using webpack we can split our code check below link http://webpack.github.io/docs/code-splitting.html


#3

I am facing same problem, Please let me know the solution, if you have.