This is a basic Webpack project template for a web app written in ES6 & LESS.
This assumes you have a directory structure as follows:
package.json
webpack.config.js
src/
index.js
static/
index.html
1. Clone the repo and start your own:
git clone [email protected]:3c83db422f03ef66ea36.git
rm -rf .git
git init
2. Install dependencies:
npm install
That's it.
Start the live-reload dev server:
PORT=8080 npm run dev
Open up http://localhost:8080/webpack-dev-server/ to see your app. The app gets reloaded as files change.
To deploy your static app, upload the contents of build/
to a web server.
Or, push this repo to heroku. http-server
is used to serve the files in build/
.
Or, and like the best option, deploy this to Firebase. Use this firebase.json.
This config uses Webpack 1.12.1 which was released in 2015. For comparison, we're now on Webpack 5 in 2021. I recommend looking for a more up-to-date Webpack starter config. Webpack's docs are a good starting place: https://webpack.js.org/configuration/
I'm including this warning since this gist is one of the first results to show for "Webpack config template" in Google Search.