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

Vite versions after v5.0.13 are not including asset urls in build #16533

Closed
7 tasks done
shivamrawal19 opened this issue Apr 26, 2024 · 1 comment
Closed
7 tasks done
Labels
duplicate This issue or pull request already exists

Comments

@shivamrawal19
Copy link

Describe the bug

Initially posted on StackOverflow: https://stackoverflow.com/questions/78192074/combination-of-latest-versions-of-vite-vue-vitejs-plugin-vue-and-vite-plugin

( maybe helpful discussion: emosheeep/vite-plugin-virtual-mpa#68 )

Explanation in brief:

Vite 5.0.13 produced the correct build,
but any version above that is breaking build ( i.e. not including asset URLs in dist HTML files )

The reproduction github repo also has package.json & package-lock.json files which was working correctly. ( under folder /package-json-versions ) you can copy them to root and use them if required.

( explained different package json files below, referenced as <name>_package.json & <name>_package-lock.json )

old_but_workingold package versionscorrect build1 vulnerability in `npm audit`
old_v2_but_workingold package versions + vite 5.0.10 -> 5.0.13correct buildno vulnerability in `npm audit`
new_but_faultylatest package versionsfaulty buildno vulnerability in `npm audit`

( My latest guess is that Vite is causing issue, but I am not sure, so do let me know if that's the case )

Reproduction

https://github.com/shivamrawal19/testmpa

Steps to reproduce

run npm install followed by npm run build

See the HTML files in the dist folder, it does not have asset URLs.

System Info

System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12450H
    Memory: 5.63 GB / 15.63 GB
  Binaries:
    Node: 20.11.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.5 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (123.0.2420.97)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

Duplicate of #15992

@sapphi-red sapphi-red marked this as a duplicate of #15992 Apr 27, 2024
@sapphi-red sapphi-red closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2024
@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants