antfu-collective / vite-ssg

Static site generation for Vue 3 on Vite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bundled code leaks absolute file paths

foxxyz opened this issue · comments

Describe the bug

Bundled code contains absolute paths, leaking user's directory structure in output.

Previously reported in #349

This likely also makes builds non-deterministic between different machines.

> git clone git@github.com:antfu/vitesse.git
> cd vitesse
> npm install
> npm run build
> cat dist/assets/app-*.js | grep -o '.*index.vue'
...
...const jb=Nr(Af,[["__file","/your/local/computer/path/to/vitesse/src/pages/index.vue

Reproduction

https://github.com/antfu/vitesse

System Info

System:
    OS: macOS 13.4
    CPU: (10) arm64 Apple M1 Max
    Memory: 18.53 GB / 64.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.2.0 - /opt/homebrew/bin/node
    npm: 9.6.6 - /opt/homebrew/bin/npm
  Browsers:
    Chrome: 114.0.5735.133
    Safari: 16.5

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Fixed with 675657a on merge of #356