-
Notifications
You must be signed in to change notification settings - Fork 136
Description
- I have tried upgrading by running
bundle update vite_ruby. - I have read the troubleshooting section before opening an issue.
Description 📖
When an entrypoint that is included with vite_typescript_tag is missing, vite_ruby dumps the whole Vite config, build status, manifest etc, which can be helpful in development. In our case though, it is over 1 million lines worth (because the manifest JSON is pretty printed).
We noticed that it does this in UAT/staging, causing 1mil log lines to be saved to uat.log/staging.log, which then gets picked up and sent to our logging service in the space of 1 minute.
We need a way to turn off this debug dump in production/uat/staging environments, but there doesn't not seem to be any way to do so currently.
Relavant bits:
vite_ruby/vite_ruby/lib/vite_ruby/manifest.rb
Lines 78 to 80 in d4bd2ef
def lookup!(name, **options) lookup(name, **options) || missing_entry_error(name, **options) end vite_ruby/vite_ruby/lib/vite_ruby/manifest.rb
Lines 216 to 223 in d4bd2ef
def missing_entry_error(name, **options) raise ViteRuby::MissingEntrypointError.new( file_name: resolve_entry_name(name, **options), last_build: builder.last_build_metadata, manifest: @manifest, config: config, ) end - https://github.com/ElMassimo/vite_ruby/blob/main/vite_ruby/lib/vite_ruby/missing_entrypoint_error.rb
No config options to turn this off or to minimize the output.