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

Use webpack.config.js

From the course: SharePoint Framework for Developers: 1 Understanding the Toolchain

Start my 1-month free trial

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…

Contents