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

development mode and build mode instrument result is different in SSR project #67

Closed
4 tasks done
sunnywanggit opened this issue Jan 8, 2023 · 7 comments · Fixed by #74
Closed
4 tasks done
Assignees
Labels
bug Something isn't working released

Comments

@sunnywanggit
Copy link

Describe the bug

development mode and build mode instrument result is different in SSR project

development mode:
image

build mode:
image

Reproduction

https://github.com/sunnywanggit/coverage

Steps to reproduce

No response

System Info

System:
    OS: Windows 10 10.0.22000
    CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics         
    Memory: 1.17 GB / 15.86 GB
  Binaries:
    Node: 16.14.0 - D:\dachui\install\node\node.EXE
    Yarn: 1.22.15 - D:\dachui\install\node\yarn.CMD
    npm: 8.3.1 - D:\dachui\install\node\npm.CMD
  Browsers:
    Edge: Spartan (44.22000.120.0), Chromium (108.0.1462.76)
    Internet Explorer: 11.0.22000.120

Used Package Manager

yarn

Logs

No response

Validations

@sunnywanggit sunnywanggit added the bug Something isn't working label Jan 8, 2023
@iFaxity
Copy link
Owner

iFaxity commented Jan 10, 2023

Hi @sunnywanggit,

I'll look at this and see if i can find a cause.

Might be an error when the instrumenter gets the ID for the file as the filenames are different in build and in serve mode.

@sunnywanggit
Copy link
Author

@iFaxity Thanks a lot

@iFaxity iFaxity self-assigned this Jan 21, 2023
@iFaxity
Copy link
Owner

iFaxity commented Jan 21, 2023

After looking into this there could be a fix to manipulate the module ID to remove the query parameters after the file path. However not sure what consequence this can have on other setups.

I will try this approach as there seem to not be a fix using Vite/Rollups own API. as getFileName is not valid for the modules and getModuleInfo does not yield anything interesting. The query parameters is only there for the Vue plugin to know how to parse the file, nothing else it seems.

@iFaxity
Copy link
Owner

iFaxity commented Jan 29, 2023

@sunnywanggit Please try the solution release in the version v4.0.0-rc.2.

If it is ok i will publish it along a release in the future, but for now it is in a release candidate to try out the feature

@iFaxity iFaxity reopened this Jan 29, 2023
@vduggen
Copy link

vduggen commented Feb 27, 2023

@sunnywanggit Please try the solution release in the version v4.0.0-rc.2.

If it is ok i will publish it along a release in the future, but for now it is in a release candidate to try out the feature

I tested it on version v4.0.0-rc.2 and it's working fine, I was scared because in the beginning it was the cache hahaha, thanks a lot for the project it helped a lot! I felt some difficulties because it doesn't have much content, but I want to see if I contribute to the community.

PS: I'm Brazilian and I'm using google translator, sorry if the translation is bad

@iFaxity
Copy link
Owner

iFaxity commented Feb 27, 2023

@vduggen No worries I understand you just fine 😊.

Great that the solution worked, I will publish it in a stable release very soon.

Thanks for contributing 👍.

@iFaxity iFaxity closed this as completed Feb 27, 2023
@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 4.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants