Create a JavaScript file
Create a plain JavaScript file and write any code you need; it will run only once after the page reloads.
/fragments/js/constant/test.js
console.log("copilot");copy
📜 note
Fragmenium is not compatible with static import
Configuring JS Constant Fragment
In ref add a js object; inside it create a constant array whose items
are the absolute paths of the JavaScript constant fragments to execute once per reload.
/reference.js
export const ref ={
js:{
constant:["/fragments/js/constant/test.js"]
}
}copy