Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server HMR error messages only flashing #8

Closed
superflausch opened this issue Nov 29, 2022 · 3 comments
Closed

Server HMR error messages only flashing #8

superflausch opened this issue Nov 29, 2022 · 3 comments

Comments

@superflausch
Copy link

After altering our existing Vite project to Vituum the HMR error message overlay only flashes briefly in the browser before disappearing.

Restarting vite will render the error message once, after a browser refresh or a refresh because of a file change the error message will only flash briefly again.

Any ideas what could cause this behaviour?

Cheers

@lubomirblazekcz
Copy link
Member

could you send a repro? or vite.config.js atleast?

@superflausch
Copy link
Author

I hope the vite.config.js helps.

import { defineConfig } from 'vituum'
import twig from '@vituum/twig'

// POSTCSS
import autoprefixer from 'autoprefixer'
import postcssImport from 'postcss-import'
import postcssNested from 'postcss-nested'
import postcssCustomMedia from 'postcss-custom-media'
import postcssImportExtGlob from 'postcss-import-ext-glob'

export default defineConfig({
  integrations: [twig()],
  templates: {
    format: 'twig',
  },
  output: 'dist',
  vite: {
    css: {
      postcss: {
        plugins: [
          autoprefixer,
          postcssImportExtGlob,
          postcssImport,
          postcssNested,
          postcssCustomMedia,
        ],
      },
    },
  },
})

@lubomirblazekcz
Copy link
Member

Thanks, I've been able to reproduce this in Chrome, works in Firefox though. Should be fixed in plugin now -> vituum/vite-plugin-twig@3c33dd5

Update your deps in project, eg. with npm update and should be fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants