July 2017
Intermediate to advanced
384 pages
8h 23m
English
Webpack only understands JavaScript files as modules. Every other file (.css, .scss, .json, .jpg, and many more) can be transformed into a module while importing. Loaders transform these files and add them to the dependency graph. Loader configuration should be done under module.rules. There are two main options in the loader configuration:
module: { rules: [ {test: /.json$/, loader: 'json-loader'}, {test: /.html$/, loader: 'raw-loader'}, ... ]}
Note that loaders should be registered in package.json so that they can be installed under node_modules. Webpack homepage has a ...
Read now
Unlock full access