To enhance your experience with webpack, it's a great idea to use a webpack.config file. Learn how this file will describe all of the configuration settings for your webpack project to facilitate automation.
- [Instructor] So far, we've run webpack manually…specifying the location of the source file…and where the bundle should be placed.…A more common practice when working with webpack is…to create configuration file.…The webpack config file is just a java script file…that you'll place at the root of your project.…So the first thing I want to do here is inside of 0104 start…I'm going to create a new folder…and it's going to be called source.…Now inside of source, we want to relocate the index js file…right there into that source file.…
Perfect.…So the next thing I want to do is go back over to sublime…and we'll create our webpack config.…So, the new file is going to be called webpack.config.js.…And it's always called that no matter what.…It'll always look for that file.…So the next think I want to do here…is we'll say module.exportS and this'll be set to an object…where our first key is entry.…
And we're going to look for the entry point…where our main java script file there…in the source index.js.…Now we could of kept the index js in the root…
- What is webpack?
- Running webpack from the command line
- Setting up loaders
- Loading CSS
- Compiling SCSS
- Using webpack plugins
Skill Level Intermediate
1. What is webpack?
2. webpack Loaders
3. webpack and CSS
4. webpack Plugins
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.