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

本地正常,生产环境无效? #97

Closed
Autet opened this issue Oct 12, 2022 · 0 comments
Closed

本地正常,生产环境无效? #97

Autet opened this issue Oct 12, 2022 · 0 comments

Comments

@Autet
Copy link

Autet commented Oct 12, 2022

安装

 "devDependencies": {
   "vite-plugin-style-import": "^2.0.0",
}

引用

import { createStyleImportPlugin, AndDesignVueResolve } from 'vite-plugin-style-import';

export function styleInportPlugins(){
  return createStyleImportPlugin({
    resolves: [
      AndDesignVueResolve()
    ],
    libs: [
      {
        libraryName: 'ant-design-vue',
        esModule: true,
        resolveStyle: (name) => {
          return `ant-design-vue/es/${name}/style/index`
        },
      },
    ],
  })
}
@Autet Autet closed this as completed Oct 12, 2022
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

1 participant