/ Geeky techie

Starting a project with Webpack

Installing webpack:

Step 1: Download Node globally - npm install -g webpack

Step 2: Create a project folder at your desired directory

Step 3: Open that project folder on your IDE application - VS Code, Atom etc.

Step 4: Generate config file inside the folder - npm init

Step 5: Give descriptions of your project - Entry point - app.js

Step 6: Inside the IDE, create index.html file and include script - bundle.js

Step 7: Create app.js file as the source file

Step 8: Inside the folder - webpack app.js bundle.js

Step 9: Create another page for requiring modules - people.js in the root

Step 10: Update your files on the fly - webpack app.js bundle.js --watch

Step 11: Install jQuery if you need - npm install jquery --save

Step 12: Install Bootstrap if you like - npm install bootstrap

Here's a video tutorial that I loved in order to learn doing this -

Github reponsitory:
Click here to get the final codes.

Shopnil Mahmud

Shopnil Mahmud

A software engineer with avid interest on any form of arts and philosophy. Likes to write codes for a living and poetry for the soul. Currently residing in Toronto, originally from Bangladesh.

Read More