cedro
Version:
Javascript library to build user interfece based on widgets.
8 lines (7 loc) • 345 B
text/typescript
export const getAdaptedUrl = (url: string) => {
const timestamp = new Date().getTime();
const isProduction = process.env.NODE_ENV === "production";
const pathDev = "../../../../src" + url + "?ts=" + timestamp;
const pathProduction = `/assets${url}index.js?ts=${timestamp}`;
return isProduction ? pathProduction : pathDev;
};