wiidede / arco-design-nuxt-module Goto Github PK
View Code? Open in Web Editor NEWNuxt Module for Arco Design Vue. Automatically import components, icons and more.
Home Page: https://www.npmjs.com/package/arco-design-nuxt-module
Nuxt Module for Arco Design Vue. Automatically import components, icons and more.
Home Page: https://www.npmjs.com/package/arco-design-nuxt-module
请提供一下最小复现
Originally posted by @wiidede in #2 (comment)
你好,可能是我升级NUXT项目的问题,今天已经修复了。
First of all, thank you very much for this project. When building the project, I found that Nuxt3 does not seem to recognize my custom theme from Arco Design Lab through plugins and nuxt.config.json. Even after importing the theme styles, it still defaults to the default Arco theme.
<a-config-provider :locale="enUS">
// .....
</a-config-provider>
import enUS from "@arco-design/web-vue/es/locale/lang/en-US";
It Works Fine Locally, but on GitHub actions, I encountered an issue while building the project.
[log] Nuxt 3.10.3 with Nitro 2.9.3
[info] Building client...
[info] vite v5.1.6 building for production...
[info] transforming...
[info] ✓ 220 modules transformed.
Inspect report generated at /home/runner/work/{ProjectName}/{ProjectName}/.nuxt/analyze/.vite-inspect
Error: x Build failed in 3.[13](https://github.com/{ProjectName}/actions/runs/8318745131/job/22761076857#step:8:14)s
Error: Nuxt Build Error: [vite]: Rollup failed to resolve import "@arco-design/web-vue/es/locale/lang/en-US" from "/home/runner/work/{ProjectName}/{ProjectName}/app.vue".
I also added the following configuration to my NuxtConfig file:
vite: {
build: {
rollupOptions: {
external: ["@arco-design/web-vue/es/locale/lang/en-US],
},
},
},
However, even with this configuration, Nitro is still unable to import the third-party packaged module. But Vite solves the import issue.
....
ℹ Building server...
ℹ vite v5.1.6 building SSR bundle for production...
ℹ ✓ 1294 modules transformed.
...
✔ Server built in 9668ms
ℹ Initializing prerenderer
[warn] "@arco-design/web-vue/es/locale/lang/en-US" is imported by ".nuxt/dist/server/{########.js}", but could not be resolved – treating it as an external dependency.
....Repeat this line on different js modules.....
Error: [nuxt] [request error] [unhandled] [500] Cannot find package '@arco-design/web-vue' imported from /home/runner/work/{ProjectName}/{ProjectName}/.nuxt/prerender/chunks/build/server.mjs
大佬能不能同步一下最新版本,感谢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.