DEV: Correctly strip sourcemap URL from splash-screen js (#22879)

In e1d27400f5 we started running the splash-screen JS through terser, which removed the trailing newline from the `sourceMappingURL` line.

Adding a reliable end-to-end test for this isn't possible because our testing environment doesn't use terser.
This commit is contained in:
David Taylor 2023-07-31 16:49:27 +01:00 committed by GitHub
parent 8a0d00b866
commit 7ecaf6295d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ module SplashScreenHelper
def self.load_js
File.read("#{Rails.root}/app/assets/javascripts/discourse/dist/assets/splash-screen.js").sub(
"//# sourceMappingURL=splash-screen.map\n",
"//# sourceMappingURL=splash-screen.map",
"",
)
rescue Errno::ENOENT