diff --git a/src/content/guides/lazy-loading.md b/src/content/guides/lazy-loading.md index c0e8c82d2daf..3bffae329762 100644 --- a/src/content/guides/lazy-loading.md +++ b/src/content/guides/lazy-loading.md @@ -39,6 +39,31 @@ webpack-demo |- /node_modules ``` +__webpack.config.js__ + +``` diff + const path = require("path"); ++ const { CleanWebpackPlugin } = require("clean-webpack-plugin"); ++ const HtmlWebpackPlugin = require("html-webpack-plugin"); + + module.exports = { + mode: "development", + entry: { + index: "./src/index.js", + }, ++ plugins: [ ++ new CleanWebpackPlugin(), ++ new HtmlWebpackPlugin({ ++ title: "Production", ++ }), ++ ], + output: { + filename: "[name].bundle.js", + path: path.resolve(__dirname, "dist"), + }, +}; +``` + __src/print.js__ ``` js