Commit 5bd7871e authored by Konrad Borowski's avatar Konrad Borowski

Merge branch 'dynamic-js-path' into 'master'

Dynamically retrieve JS path in debug builds

See merge request!70
parents a0d33d58 308eb400
Pipeline #96961928 passed with stage
in 8 minutes and 43 seconds
use std::borrow::Cow;
use std::fs;
pub fn path() -> Cow<'static, str> {
let path = env!("ENTRY_FILE_PATH");
let path = fs::read_to_string("entry").unwrap();
pub mod js;
pub mod language;
pub mod paste;
pub mod rejection;
......@@ -3,4 +3,4 @@
@(session: &Session)
<script src="/@env!("ENTRY_FILE_PATH")" nonce="@session.nonce"></script>
<script src="/@crate::models::js::path()" nonce="@session.nonce"></script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment