Skip to content

Maybe the getThemeVariables support use in esm? #5735

@cnguu

Description

@cnguu
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

use in esm

vue.config.ts

import { defineConfig } from '@vue/cli-service';

//const { getThemeVariables } = require('ant-design-vue/dist/theme');
import { getThemeVariables } from 'ant-design-vue/dist/theme';

export default defineConfig({
  css: {
    loaderOptions: {
      less: {
        lessOptions: {
          modifyVars: {
            ...getThemeVariables({ dark: false, compact: false })
          },
          javascriptEnabled: true,
        },
      },
    },
  },
});

What does the proposed API look like?

import { getThemeVariables } from 'ant-design-vue/dist/theme';

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions