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

build后index.html没有生成script标签 #96

Open
1 task
ianzhi opened this issue Dec 30, 2022 · 6 comments
Open
1 task

build后index.html没有生成script标签 #96

ianzhi opened this issue Dec 30, 2022 · 6 comments
Labels
vite4 vite version

Comments

@ianzhi
Copy link

ianzhi commented Dec 30, 2022

Basic Info

  • Package Name And Version: [email protected]
  • Framework version: Vue3.2.40
  • Browser: chrome108.0.0.0

What is expected?

正常打包

Steps to reproduce

  1. arco-cli 1.27.4
  2. Vue
  3. Arco Pro项目
  4. 完整版
  5. npm run build

Extra info

所有输出正常,生成的index.html没有引入js

@jakemama
Copy link

jakemama commented Jan 6, 2023

same question. i found the reason maybe configArcoResolverPlugin() in vite.config.prod.ts.

according to the issue, it may not support vite4

@ianzhi
Copy link
Author

ianzhi commented Jan 6, 2023

使用yarn安装依赖最终生成的html不会生成script标签,但是删除yarn.lock文件,使用npm安装依赖不会出现这个问题。

@jakemama
Copy link

jakemama commented Jan 6, 2023

使用yarn安装依赖最终生成的html不会生成script标签,但是删除yarn.lock文件,使用npm安装依赖不会出现这个问题。

我试了一下你的这个方法,但是build时依赖报错了

[vite:css] [postcss] Cannot find package '/Users/xxx/Desktop/demo/acro/hello-arco-pro-slim/node_modules/vite/node_modules/postcss/' imported from /Users/xxx/Desktop/demo/acro/hello-arco-pro-slim/node_modules/vite/dist/node/chunks/dep-2285ba4f.js
Did you mean to import postcss/lib/postcss.js?

然后我把vite版本降到3,用yarn也可以成功build了

@imtiger
Copy link

imtiger commented Jan 8, 2023

same question. i found the reason maybe configArcoResolverPlugin() in vite.config.prod.ts.

according to the issue, it may not support vite4

thanks ,it woks for m,i just downgrade vite version from 4 to 3.

@yuhan0709 yuhan0709 added the vite4 vite version label Jan 13, 2023
@pionear-layen
Copy link

我的也出现了

@pionear-layen
Copy link

看了最新的记录,官方已解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vite4 vite version
Projects
None yet
Development

No branches or pull requests

5 participants