Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

不支持react-vant这个组件库,麻烦支持下!!! #96

Open
AciGo opened this issue Sep 15, 2022 · 0 comments
Open

不支持react-vant这个组件库,麻烦支持下!!! #96

AciGo opened this issue Sep 15, 2022 · 0 comments

Comments

@AciGo
Copy link

AciGo commented Sep 15, 2022

  • 我的vite版本"vite": "^3.0.7"
  • 组件库地址:https://react-vant.3lang.dev/
  • 一开始这么设置报错,路径不对(蓝色线是多于的):
createStyleImportPlugin({
  libs: [
    {
      libraryName: "react-vant",
      esModule: true,
      resolveStyle: (name) => {
        return `react-vant/es/${name}/style/index.css`;
      },
    },
  ],
})

image

  • 我按照以下配置,但是不生效:
createStyleImportPlugin({
  libs: [
    {
      libraryName: "react-vant",
      esModule: true,
      resolveStyle: (name) => {
        return `../es/${name}/style/index.css`;
      },
    },
  ],
})
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant