UNPKG

cedro

Version:

Javascript library to build user interfece based on widgets.

9 lines (8 loc) 409 B
export const getAdaptedUrl = (url: string) => { const timestamp = new Date().getTime(); const isProduction = process.env.NODE_ENV === "production"; //const pathDev = `../../../../src${url}index.js?ts=${timestamp}`; const pathDev = ".." + url + "?ts=" + timestamp; const pathProduction = `../../assets${url}/index.js?ts=${timestamp}`; return isProduction ? pathProduction : pathDev; };