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

css url() after legacy build generate __VITE_ASSET__hash in legacy.js file #9530

Closed
7 tasks done
yanglei00 opened this issue Aug 4, 2022 · 1 comment · Fixed by #9507
Closed
7 tasks done

css url() after legacy build generate __VITE_ASSET__hash in legacy.js file #9530

yanglei00 opened this issue Aug 4, 2022 · 1 comment · Fixed by #9507
Labels
duplicate This issue or pull request already exists

Comments

@yanglei00
Copy link

Describe the bug

vite@3.0.4、 @vitejs/plugin-legacy@2.0.0 用url()引入背景图,在build后legacy.js文件里的__VITE_ASSET__hash没有被替换掉

Reproduction

https://github.com/yanglei00/vite-bug-report

System Info

System:
    OS: macOS 12.2.1
    CPU: (8) arm64 Apple M1
    Memory: 63.28 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v16.13.1/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
  Browsers:
    Chrome: 104.0.5112.79
    Chrome Canary: 106.0.5218.0
    Firefox: 99.0.1
    Safari: 15.3
  npmPackages:
    @vitejs/plugin-legacy: ^2.0.0 => 2.0.0 
    @vitejs/plugin-vue: ^3.0.1 => 3.0.1 
    vite: ^3.0.4 => 3.0.4

Used Package Manager

pnpm

Logs

  1. pnpm build
  2. dist/assets/index-legacy.54087a6e.js文件中搜索__VITE_ASSET__

Validations

@yanglei00 yanglei00 changed the title url() after legacy build generate __VITE_ASSET__hash in legacy.js file css url() after legacy build generate __VITE_ASSET__hash in legacy.js file Aug 4, 2022
@sapphi-red
Copy link
Member

Duplicate of #9246

@sapphi-red sapphi-red marked this as a duplicate of #9246 Aug 4, 2022
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Aug 4, 2022
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Aug 4, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants