alexlafroscia / vite-plugin-handlebars

Vite support for Handlebars
186 stars 22 forks source link

Reloading not happening when partial changes (windows 10) #249

Open eu-sou-o-duardo opened 1 year ago

eu-sou-o-duardo commented 1 year ago

When I hit save the therminal shows [vite] page reload partiasl/fine.html but the browser never reloads.

I did a investigation I found out that there is a check if the file changed must trigger a full-reload, and that check is broken. At least at windows.

The check: image

The values (set and filename) being checked: image

For some reason, the slashes are the being misplaced.

I have noticed that the problem appear immediately after the partial filename has been added to the set

image

image

My vite config is the following:

export default defineConfig({
  root: "src",
  assetsInclude: ["/src/partials/*"],
  plugins: [
    handlebarsPlugin({
      partialDirectory: resolve(__dirname, "src/partials"),
    }),
  ],
});

Suggestion: Remove the check partialsSet.has(file), looks like its no necessary

Raven0us commented 9 months ago

Any update on this?

owaisahmed5300 commented 7 months ago

Any update?

sKopheK commented 4 months ago

this fork seems to work https://www.npmjs.com/package/@agilebot/vite-plugin-handlebars