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

Lost style after packaging (打包后样式丢失) #14

Closed
YernarT opened this issue Aug 20, 2023 · 2 comments
Closed

Lost style after packaging (打包后样式丢失) #14

YernarT opened this issue Aug 20, 2023 · 2 comments

Comments

@YernarT
Copy link

YernarT commented Aug 20, 2023

使用 pnpm generate 打包 Nuxt3 项目后所有 ant-design-vue 的组件样式都丢失了, JS 还存在。

依赖:

"dependencies": {
    "ant-design-vue": "^4.0.0",
  },
  "devDependencies": {
    "@ant-design-vue/nuxt": "^1.0.1",
    "nuxt": "^3.6.2",
  }

执行的打包命令:
"generate": "nuxt generate",

Nuxt配置:

export default defineNuxtConfig({
  srcDir: "src/",
  
  modules: ["@ant-design-vue/nuxt"],
});

在项目中的使用方式:
没有手动导入,使用自动导入的

<template>
  <a-button type="primary">Hello Wolrd</a-button>
</template>

<script setup />

打包后该组件的class都还在(antd 本身添加的类名),但是没有对应的css样式。

@aibayanyu20
Copy link
Member

等主库发版后会解决这个水合的问题

@aibayanyu20
Copy link
Member

已经发版了,参考demo

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

2 participants