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

Use [name]-[hash].[extname] for assets to match behavior in Rollup 3 #333

Closed
2 tasks done
krisrang opened this issue Jan 10, 2023 · 0 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@krisrang
Copy link

  • I have tried upgrading by running bundle update vite_ruby.
  • I have read the troubleshooting section before opening an issue.

Description 📖

Vite has changed to using [name]-[hash].[extname] for asset filenames while vite-plugin-ruby still overrides it to [name].[hash].[extname] for non-SSR builds.

vitejs/vite#10927

This results in the outputted asset filenames being different between regular and SSR builds.

Reproduction 🐞

Please provide a link to a repo that can reproduce the problem you ran into.

Vite Ruby Info

Run bin/rake vite:info and provide the output:

bin/vite present?: true
vite_ruby: 3.2.14
vite_rails: 3.0.13
rails: 7.0.4
node: v16.19.0
npm: 8.19.3
yarn: 1.22.17
pnpm: 7.20.0
ruby: ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]

installed packages:
skyltmax@ /Users/kris/code/skyltmax
├─┬ @modyfi/vite-plugin-yaml@1.0.4
│ └── vite@4.0.4 deduped
├─┬ @vitejs/plugin-react@3.0.1
│ └── vite@4.0.4 deduped
├─┬ vite-plugin-full-reload@1.0.5
│ └── vite@4.0.4 deduped
├─┬ vite-plugin-ruby@3.1.3
│ └── vite@4.0.4 deduped
├─┬ vite-plugin-svgr@2.4.0
│ └── vite@4.0.4 deduped
├─┬ vite-tsconfig-paths@4.0.3
│ └── vite@4.0.4 deduped
└── vite@4.0.4

Logs 📜

If not providing a reproduction:

Output

Run DEBUG=vite-plugin-ruby:* bin/vite dev or DEBUG=vite-plugin-ruby:* bin/vite build and provide the output:

Screenshots 📷

Provide console or browser screenshots of the problem.

@krisrang krisrang added the bug: pending triage Something doesn't seem to be working, but hasn't been verified label Jan 10, 2023
@ElMassimo ElMassimo added enhancement New feature or request and removed bug: pending triage Something doesn't seem to be working, but hasn't been verified labels Jan 16, 2023
@ElMassimo ElMassimo changed the title SSR output asset filenames different from regular build Use [name]-[hash].[extname] for assets to match behavior in Rollup 3 Jan 16, 2023
hulloitskai added a commit to hulloitskai/itskai that referenced this issue Feb 13, 2023
@ElMassimo ElMassimo added bug Something isn't working and removed enhancement New feature or request labels Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants