Setup and Installation
Basic folder structure setup
Lets start by creating an empty project folder and initialize it for npm using npm init
command
- On the terminal /command prompt, cd to the folder where you want to create your project folder.
- Create a folder
learn-webpack2
usingmkdir
command and cd to this new folder.
3. Initialize it for npm using npm init
command, and answer the questions the command prompts for. In the end, the command will show you the contents of package.json its going to create for you in the folder and ask you to confirm, press enter / yes to confirm.
4. Open the folder in a web editor of your choice. I am using Visual studio code. You should see package.json
created by the above command in the folder.
5. We will create the bare minimum folders and files, as below, for us to get started with a javascript application.
6. Add the below code to app.js
[ < Prev: Introduction ] [ Next: Installing Webpack > ]