Skip to content

ant-design-vue custom theme style is invalid #160

@i7eo

Description

@i7eo

version:

{
    // ...
    "vue": "^3.2.19",
    "ant-design-vue": "^2.2.8",
     "vite": "^2.5.10",
     "unplugin-vue-components": "^0.15.4"
}

vite.config.js:

{
    // ...
    css: {
        preprocessorOptions: {
          less: {
            modifyVars: {
              'primary-color': '#3351c7',
              'border-radius-base': '10px'
            },
            javascriptEnabled: true
          }
        }
    },
    plugins: [
        Components({
          resolvers: [
            AntDesignVueResolver(),
          ],
          dts: true,
          include: [/\.vue$/, /\.vue\?vue/, /\.tsx$/, /\.jsx$/]
        })
     ]
}

The component does not change after startup, If I introduce the whole thing in the entry without using unplugin-vue-components, the style will change.

Activity

ekxs0109

ekxs0109 commented on Oct 19, 2021

@ekxs0109

+1

ekxs0109

ekxs0109 commented on Oct 19, 2021

@ekxs0109

image

importStyle: "less"
可以正常使用自定义样式

nabaonan

nabaonan commented on Oct 21, 2021

@nabaonan
Collaborator

use less option is ok , default is css

i7eo

i7eo commented on Oct 21, 2021

@i7eo
Author

use less option is ok , default is css

alright i got it

lifedever

lifedever commented on Apr 17, 2022

@lifedever

赞👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @lifedever@antfu@nabaonan@i7eo@ekxs0109

        Issue actions

          ant-design-vue custom theme style is invalid · Issue #160 · unplugin/unplugin-vue-components