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.

Example of webpack fixing the problem of interdependent scripts

Example of webpack fixing the problem of interdependent scripts

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

Start my 1-month free trial

Example of webpack fixing the problem of interdependent scripts

- [Instructor] Now I just demonstrated to you how even a very simple website application with just two JavaScript files can fail. If this server did not respond on time, my application would break. So it's like it works on my machine, but in production it doesn't work. Imagine there could be numerous other situations. What if there's like a file, like an image file that you rely on? Or what if it's a mobile application that needs to work offline? Remember these days we're writing a lot of hybrid applications as well. Okay, Webpack helps this situation out. I've already added a dependence on Webpack here and I've done it npm install. Remember this is a dev dependency so we will never ship this to production. In order to have Webpack bundle this application properly, we need to make some very minor changes to our code. What I wish to be able to do now is that I wish to reword my index.js so this underscore variable we have a little bit more guarantee that by the time line five runs…

Contents