Build scripts are repeatable bits of code that you can execute via the command line. In the package.json file, learn how to set up build scripts to avoid typing long commands repeatedly.
- [Instructor] With this node_modules/.bin/webpack command…we've been running webpack…in kind of a convoluted way.…We've been actually going to the node modules folder…inside of the bin folder, and then we've been saying…run webpack, this executable here.…Now that's fine and everything,…but we can make our life a little bit easier…by setting up an NPM build script.…Where we want to start here is to open…the package JSON file, and then we should have…this test command here…that we're going to replace with a build command.…
So, the key should be build,…and then we're going to take this string…and replace it with webpack.…So we don't have to dig it…out of the node modules folder…because webpack is going to know…based on the presence of the webpack config file…that it should just run webpack…with those different configuration settings.…So let's give that a save and give it a shot.…So we'll delete that node module stuff,…and then we're going to try npm run build.…
So this is going to run webpack for us,…and it'll generate our bundle…
- What is webpack?
- Running webpack from the command line
- Setting up loaders
- Loading CSS
- Compiling SCSS
- Using webpack plugins
Skill Level Intermediate
Workflow Tools for Web Developerswith Christina Truong1h 13m 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.