-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dynamic imports come from getAdaptedUrl from path.import.dev or path.…
…import.release
- Loading branch information
Horacio Daniel Ros
committed
Aug 29, 2024
1 parent
f7911bb
commit 6c1b85e
Showing
5 changed files
with
20 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ package-lock.json | |
dist | ||
dist/* | ||
lib | ||
lib/* | ||
lib/* | ||
.vscode/* | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export const getAdaptedUrl = (url: string) => { | ||
const timestamp = new Date().getTime(); | ||
const isProduction = process.env.NODE_ENV === "production"; | ||
const pathDev = ".." + url + "?ts=" + timestamp; | ||
const pathProduction = `../../assets${url}/index.js?ts=${timestamp}`; | ||
return isProduction ? pathProduction : pathDev; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
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; | ||
}; |