D
D
Dima Pautov2018-04-12 15:42:26
webpack
Dima Pautov, 2018-04-12 15:42:26

Why doesn't webpack update the page with handlebars changes?

Good afternoon. I made myself an assembly of pages, using handlebars as a template engine.
In webpacke, I use the handlebars-webpack-plugin plugin , and in the plugins section, I wrote the plugin initialization:

new HandlebarsPlugin({
            entry: path.resolve(__dirname, "app", "html", "pages", "*.hbs"),
            output: path.resolve(__dirname, "dist", "[name].html"),
            partials: [
                path.resolve(__dirname, "app", "html", "components", "*.hbs"),
                path.resolve(__dirname, "app", "html", "components", "*", "*.hbs")
            ]
        }),

Everything works fine, only hot reload for hbs does not work. Css, js files work in hot reload, but hbs doesn't. You have to stop the dev server and start again.
I searched a lot of materials, but could not find a solution in any way.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question