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

Unable to use prefix configuration #232

Open
rex-ll opened this issue Sep 10, 2021 · 1 comment
Open

Unable to use prefix configuration #232

rex-ll opened this issue Sep 10, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@rex-ll
Copy link

rex-ll commented Sep 10, 2021

Describe the bug
Unable to use prefix configuration

Minimal Reproductions

vite.config.js

import windiCSS from 'vite-plugin-windicss';

export default () => {
 // ***
  return {
    plugins: [windiCSS()]
  }
 // ***
}

windi.config.js

import { defineConfig } from 'vite-plugin-windicss';
export default defineConfig({
  prefix: 'test-',
})
[vite] Internal server error: Cannot read property 'type' of undefined
      at sortMeta (D:\experimental\test\node_modules\windicss\lib\index.js:1069:16)
      at Array.sort (<anonymous>)
      at StyleSheet.sort (D:\experimental\test\node_modules\windicss\lib\index.js:1219:39)
      at Processor.interpret (D:\experimental\test\node_modules\windicss\lib\index.js:11502:36)
      at buildPendingStyles (D:\experimental\test\node_modules\@windicss\plugin-utils\dist\index.js:754:32)
      at Object.generateCSS (D:\experimental\test\node_modules\@windicss\plugin-utils\dist\index.js:798:5)
      at async Context.load (D:\experimental\test\node_modules\vite-plugin-windicss\dist\index.js:75:21)
      at async Object.load (D:\experimental\test\node_modules\vite\dist\node\chunks\dep-972722fa.js:51335:32)
      at async transformRequest (D:\experimental\test\node_modules\vite\dist\node\chunks\dep-972722fa.js:67037:24)
      at async viteTransformMiddleware (D:\experimental\test\node_modules\vite\dist\node\chunks\dep-972722fa.js:67225:32)

Versions

  • vite-plugin-windicss: 1.3.0
  • vite: 2.5.1
  • framework(vue/react/svelte/etc): Vue 3.2.6

Additonal Context

@rex-ll rex-ll added the bug Something isn't working label Sep 10, 2021
@AGPDev
Copy link

AGPDev commented Oct 20, 2021

I have this problem too

  • vite-plugin-windicss: 1.4.12
  • vite: 2.6.10
  • vue: 3.2.20

@DoubleRayWang in my case after remove one module in extract includes solve the problem. Maybe your prefix is much generic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants