html-webpack-plugin icon indicating copy to clipboard operation
html-webpack-plugin copied to clipboard

Compiling loop?

Open lukecharle opened this issue 2 years ago • 1 comments

Current behaviour 💣

I'm using the following within my dev build in webpack:

new HtmlWebpackPlugin({
      filename: `../snippets/script-tags.liquid`,
      template: path.resolve(__dirname, '../templates/script-tags.html'),
      inject: false,
    }),

But this is just running a continue compiling and never stops:

Screenshot 2023-01-30 at 22 33 26

I have even used the basic setup:

new HtmlWebpackPlugin(),

I'm thinking this inserts my new file script-tags.liquid, which then triggers the watch to run it again thus creating the loop? How could I go about this file getting updated on each watch trigger but not trigger the watch to run again?

Expected behaviour ☀️

Should compile once unless I save a new file.

Reproduction Example 👾

Use the following code above

Environment 🖥

Screenshot 2023-01-30 at 22 34 26

lukecharle avatar Jan 30 '23 22:01 lukecharle

Sorry for delay, can you create reproducible test repo?

alexander-akait avatar Jun 10 '23 16:06 alexander-akait