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

Documentation for Astro #5713

Open
3 tasks done
debasispanigrahi opened this issue Feb 23, 2024 · 3 comments
Open
3 tasks done

Documentation for Astro #5713

debasispanigrahi opened this issue Feb 23, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation feature request New feature or request pr welcome

Comments

@debasispanigrahi
Copy link

Clear and concise description of the problem

Currently there are no contents how to add native ui in astro

Suggested solution

A new blog containing astro intergation is needed

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@debasispanigrahi debasispanigrahi added the feature request New feature or request label Feb 23, 2024
@OrbisK OrbisK added documentation Improvements or additions to documentation pr welcome labels Feb 24, 2024
@nailiable
Copy link
Contributor

Change theastro.config.mjsto this:

import { defineConfig } from "astro/config";

import vue from "@astrojs/vue";

// https://astro.build/config
export default defineConfig({
  integrations: [vue()],
  vite: {
    plugins: [],
    ssr: {
      noExternal: ["naive-ui", "vueuc", "date-fns"],
    },
  },
});

Then the component will work on client only:

---
import { NButton } from "naive-ui"
---

<div>
  <NButton client:only="vue">Default</NButton>
</div>

If I remove theclient:only="vue" directive, it will throw an error like this:

image

It seem doesn't support server render, how can I fix it?

@07akioni

@Groupguanfang
Copy link
Contributor

Any update for this?

@Groupguanfang
Copy link
Contributor

I write a proposal to support Astro: withastro/roadmap#1098

After this proposal is realized, we can follow up the document about astro in naive ui.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature request New feature or request pr welcome
Projects
None yet
Development

No branches or pull requests

4 participants