Grab the repo here!This is a response to a Stack Overflow question. I figured out that there are people out there that may need this, even though it may look silly, at the very beginning, learning Webpack is swimming in muddy waters. This is a quick and dirty crash course using Webpack 4 and Vanilla JavaScript (No Libraries and Frameworks).Open a new folder in your computer. Check that you have NodeJS installed. Run npm init and fill in the details. After that do:npm install webpack-cli -Dnpm install webpackCreate (index.html, index.js) with the following folder structure:--index.html--src/-—----index.jsInside index.html, add the following:Webpack Simple ExampleWelcome!! This is Webpack simple exampleAlerts the user!Write text to the p tag!This should look like this:The output of the HTML fileWe're going to use Webpack in order to create an alert to the user when it clicks the "Alerts the user!" button, and write some random text when the user clicks "Write text to the p tag"Since we're learning the basics, we'll create 2 additional files: alertbox.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to


javascript,webpack,vanilla-javascript,framework