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

nuxt 2 windicss 2.2.5 can't see new classes unless I restart the npm run dev #161

Open
Surt opened this issue Feb 17, 2022 · 8 comments
Open

Comments

@Surt
Copy link

Surt commented Feb 17, 2022

Nuxt is not detecting new classes added to template on hot reload. Even if I refresh the page manually.
To see the changes I must recompile it by modifing nuxt.config.js (it starts the full compilation again) or restarting the npm run dev.

Using nuxt-windicss v2.2.5 with this configuration:

nuxt.config.js

// Windicss module configuration: https://windicss.org/guide/
    windicss: {
        analyze: true,
        preflight: {
            alias: {
                // add nuxt aliases
                'nuxt-link': 'a',
                // @nuxt/image module
                'nuxt-img': 'img',
            },
        },
    },

windi.config.js

 purge: {
        content: [],
        preserveHtmlElements: true,
        options: {
            safelist: [],
            blocklist: [],
            keyframes: true,
            fontFace: true,
            variables: true,
            rejected: true
        },
    },
    extract: {
        include: ['**/*.{vue,html,jsx,tsx}'],
        exclude: [
            'node_modules',
            'dist',
            '.git',
            '.github',
            '.nuxt',
            // testing files & folders
            'coverage',
            '**/__snapshots__',
            '*.test.js',
        ]
    },
@Robbe95
Copy link

Robbe95 commented Feb 24, 2022

I've had the same problem, disabling attributify solved it for me.
In windi.config.ts:
attributify: false

@Surt
Copy link
Author

Surt commented Feb 24, 2022

Unfortunately it did not solve my problem. I also get rid of the entire windicss config file but nothing. Same problem.

@AntonAleikin
Copy link

AntonAleikin commented Apr 3, 2022

Faced this problem while creating responsive design with nuxt-windicss@2.2.2 & webpack@4.46.0 in nuxt@2.15.8. Only after restart of npm run dev all classes are applied correctly according to the screen size.

@liamsnowdon
Copy link

Disabling attributify worked for me here too, would be good to be able to use it though :)

@RWave88
Copy link

RWave88 commented Jul 20, 2022

I don't use attributify but still have this issue

@harlan-zw
Copy link
Member

I have noticed instances where the HMR breaks, it's quite difficult to debug so if anyone has any clues or can reliably replicate the issue in stackblitz I'd appreciate the help

@king-11
Copy link

king-11 commented Aug 16, 2022

yeah i have asked around to some people using the same repo as mine don't face this issue but I do

@HomWang
Copy link

HomWang commented Nov 23, 2022

Hot update issues. But I don't know how to find a way to reproduce

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

8 participants