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

Arco Pro Vue引用a-button-group组件之后,编译失败 #263

Closed
1 task done
lcw2004 opened this issue Feb 28, 2023 · 1 comment
Closed
1 task done

Arco Pro Vue引用a-button-group组件之后,编译失败 #263

lcw2004 opened this issue Feb 28, 2023 · 1 comment

Comments

@lcw2004
Copy link

lcw2004 commented Feb 28, 2023

Basic Info

  • Package Name And Version: arco-design-pro-vue@2.6.1
  • Framework version: Vue 3.2.45
  • Browser: chrome103.0.0.0

Steps to reproduce

  1. 创建Arco Pro Vue项目
    [root@VM-4-11-centos acro-test]# arco init my-project
    Please select the framework you want to use
    选择:Vue
    Please select the type of project you want to create
    选择:Arco Pro Project
    Please choose the template of Arco Pro Simple version (contains only one basic page)
    选择:Arco Pro Simple version

  2. 在任意一个Vue组件中引用 a-button-group组件。

  3. 执行build编译代码的时候报错。

  4. 报错信息如下:

[vite]: Rollup failed to resolve import "/home/one/acro-test/my-project/node_modules/@arco-design/web-vue/es/button-group/style/css.js" from "src/views/dashboard/workplace/index.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
error during build:
Error: [vite]: Rollup failed to resolve import "/home/one/acro-test/my-project/node_modules/@arco-design/web-vue/es/button-group/style/css.js" from "src/views/dashboard/workplace/index.vue?vue&type=script&setup=true&lang.ts".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
build.rollupOptions.external
at onRollupWarning (file:///home/one/acro-test/my-project/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:45832:19)
at onwarn (file:///home/one/acro-test/my-project/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:45603:13)
at Object.onwarn (file:///home/one/acro-test/my-project/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:23263:13)
at ModuleLoader.handleResolveId (file:///home/one/acro-test/my-project/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22158:26)
at file:///home/one/acro-test/my-project/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22119:26
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@sHow8e
Copy link
Member

sHow8e commented Mar 2, 2023

@lcw2004 hi 可以参考 #71

@sHow8e sHow8e closed this as completed Mar 2, 2023
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