Please tell me, I use webpack, I configured Pug there, but the next problem arose, after creating. Here are the sources:

webpack.config.js:

const path = require('path'); const webpack = require('webpack'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const HtmlWebpackPlugin = require('html-webpack-plugin'); module.exports = { context: path.resolve(__dirname, 'src'), entry: { app: [ './js/app.js' ], }, output: { filename: 'js/[name].js', path: path.resolve(__dirname, 'build'), publicPath: '../' }, devServer: { contentBase: './app' }, module: { rules: [ { test: /\.scss$/, use: ExtractTextPlugin.extract({ use: [ 'sass-loader' ], use:[ 'css-loader' ], fallback: 'style-loader' }) }, { test: /\.pug$/, include: path.join(__dirname, 'build'), use: [ { loader: 'pug-loader', options: { pretty: true }, } ] } ] }, plugins: [ new ExtractTextPlugin({ filename: 'style.css' }), new HtmlWebpackPlugin({ template: '../app/index.pug', inject: 'body' }) ] 

}

index.pug:

 Doctype html html head meta (charset = 'UTF-8') meta (name = 'viewport', content = "initial-scale=1.0, width=device-width") title body p.style Hello! 

index.html:

 Doctype html html head meta (charset = 'UTF-8') meta (name = 'viewport', content = "initial-scale=1.0, width=device-width") title body p.style Hello!<script type="text/javascript" src="../js/app.js"></script> 

    0