September 2018
Intermediate to advanced
328 pages
9h 10m
English
We're using several different file types in addition to JavaScript for the application: CSS, SVG, HTML, and so on. Installing the -loader dependencies is only part of the equation—you also need to tell Webpack how to load them. You also need to specify configuration details for any plugins you have installed. You can specify the loading and configuration details in a webpack.config.js file in the root folder of your project. The following snippet contains the contents of /webpack-example/webpack.config.js:
const HtmlWebpackPlugin = require('html-webpack-plugin');const MiniCssExtractPlugin = require('mini-css-extract-plugin');module.exports = { module: { rules: [ { test: /\.js$/, exclude: ...Read now
Unlock full access