My FeedDiscussionsHashnode Enterprise
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more
Couple of questions on Webpack! - Getting started.

Couple of questions on Webpack! - Getting started.

Mutyalarao's photo
·Mar 12, 2016

Hi Noders,

I have just started off with my first app in Vue.js and also had to use Webpack for the first time.

All I could understand is that Webpack bundles the (multiple) scripts into a specified folder which I can refer in my index.html in my app's root floor.

npm run dev starts listening on 8080 (Honestly I didnt know Webpack has a webserver ^_^ Cool...)

Now that I have a Webpack webserver ,

  1. How can I server multiple files from Webpack (like home.html, page1.html from /views folder)?
  2. Can I change the port (instead of 8080)?
  3. Can Webpack aut-build on changes to the js files? (like nodemon. Else, for every change i have to run npm run build)?
  4. I am able to handle UI and models with Vue. But, I would like to add some REST points(through a JS script) to the webpack with some logic behind then to query from another db server and respond with data. How can I do this?