🚀 A basic Webpack configuration to bundle a simple JavaScript application.
This repository contains the simplest example of how to use Webpack to bundle a JavaScript application. The webpack.config.js
file defines the basic configuration for Webpack to build a bundle from a single entry point (src/index.js
) and output it to the dist
folder as bundle.js
. In addition, the configuration includes the HtmlWebpackPlugin
to generate an HTML file with the title "Webpack Simplest Example".
- Node.js (version 10.13 or later)
- Clone this repository:
git clone https://github.com/your-username/simplest-webpack-example.git
- Install the dependencies:
cd simplest-webpack-example npm install
To build the bundle, run the following command:
npm run build
This will generate the bundle.js
file in the dist
folder and the index.html
file with the title "Webpack Simplest Example". You can open the index.html
file in your browser to see the application running.
Serve the dist files with:
npm run serve
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
🎉 Happy coding!