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.
Use webpack.config.js
From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain
Use webpack.config.js
- [Narrator] Now, you just saw the simplest possible way of having Webpack bundle up a file for you. Well, Webpack is actually very, very powerful and in this case, we're bundling a single file with some dependencies, so let's say more than one file, but the entry point is just a single file. Technically, Webpack can bundle a number of files. Create a number of files as output. Bundle even non-Java Script files like CSS and images. So, all of this intent requires us to specify configuration information to Webpack. So I am going to modify this code now to use configuration information for Webpack and this is actually very simple. You simply create a new file here called webpack.config.js. You see that this code is smart enough to understand that this is a special file and it gives it the icon of Webpack? Well, this is the standard. Technically, you could name this file whatever you want and place it wherever you want but the convention is to place it in Rune and call it…
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)
-
-
-
-
-