devtechk / webpack-minimal-startup

A minimal and easy startup with webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

webpack-minimal-startup

A minimal and easy startup with webpack. It loads and serves css and custom js into a unique bundle.

I suppose to add features time by time.

Anyway I will appreciate if you can contribute to this repo :D

Project tree

  • dist
  • src
    • css
      • style.css
    • js
      • app.js
  • index.html
  • package.json
  • package-lock.json
  • webpack.config.js
  • README.md

install

Let's install all the dependencies we need.


npm install

Bundle'em!

These are the script to bundle, watch or activate a webpack-server

  "scripts": {
    "build-dev": "webpack", 
    "watch": "webpack --watch"
    "webserver": "webpack-dev-server"
  }
  
Only bundle

bundle /src/js/app.js into /dist/bundle.js


npm run build-dev

Bundle and watch

watch the project's changes


npm run watch

Start a server

Start a server in http://localhost:8080/


npm run webserver

About

A minimal and easy startup with webpack.


Languages

Language:JavaScript 73.2%Language:HTML 24.4%Language:CSS 2.4%