JS webpack Getting Started
Ropost from https://webpack.js.org/guides/getting-started/ Webpack is used to compile JavaScript modules. Once installed , you can interface with webpack either from its CLI or API . If you're still new to webpack, please read through the core concepts and this comparison to learn why you might use it over the other tools that are out in the community. Basic Setup First let's create a directory, initialize npm, install webpack locally , and install the webpack-cli (the tool used to run webpack on the command line): mkdir webpack-demo && cd webpack-demo npm init -y npm install webpack webpack-cli --save-dev Throughout the Guides we will use diff blocks to show you what changes we're making to directories, files, and code. Now we'll create the following directory structure, files and their contents: project webpack-demo |- package.json + |- index.html + |- /src + |- index.js...