From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Introduction and need for webpack
From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain
Introduction and need for webpack
- Next, let's talk about webpack. What is it and what is the need for it? If you go to webpack.js.org, you'll find things like bundle your assets and on the left hand side, .js, .hbs, a bunch of things, and they get bundled into static assets. Why would we want to do this? Well let's see that through a practical example. In the previous chapter, if you go into exercise files, chapter two, folder seven, pick up the End code there, unzip it, and run npm install. You should have a project setup that looks like this. You should have an index.js. You should have a package.json. We are relying on an old module called Moment. And now, I can go to terminal and simply type node index.js and it seems to work. Now, node index.js, if you go up here, node index.js has a line at the top that says var moment = require('moment') and as I explained in the previous chapter, it dives into the node module's folder and it looks for the definition of this Moment object that we're trying to create. Visual…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Introduction and need for webpack3m 30s
-
(Locked)
Example of a simple website breaking without webpack4m 54s
-
(Locked)
Example of webpack fixing the problem of interdependent scripts6m 17s
-
(Locked)
Use webpack.config.js3m 31s
-
(Locked)
Use webpack to bundle CSS6m 25s
-
(Locked)
Use webpack to bundle images5m 5s
-
(Locked)
Use webpack to create distributable versions of our application6m 43s
-
(Locked)
-
-
-
-
-