diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-06-13 23:28:57 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2025-06-13 23:28:57 +0530 |
| commit | 7164ef595147d997068b953d0e8bd19add0db5f9 (patch) | |
| tree | 415a297d71c7ef93c5bc38d071b8870d01020fa2 /config/webpack/utils/scripts.js | |
| parent | 64e38ab240a1ca3427592eb80f2cef57fddbdafe (diff) | |
| download | banglar-bhumi-utils-7164ef595147d997068b953d0e8bd19add0db5f9.tar.gz banglar-bhumi-utils-7164ef595147d997068b953d0e8bd19add0db5f9.zip | |
Using es-modules for webpack configuration.
Diffstat (limited to 'config/webpack/utils/scripts.js')
| -rw-r--r-- | config/webpack/utils/scripts.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/config/webpack/utils/scripts.js b/config/webpack/utils/scripts.js index 427aaab..af58e0a 100644 --- a/config/webpack/utils/scripts.js +++ b/config/webpack/utils/scripts.js @@ -1,5 +1,11 @@ -const path = require("path"); -const scripts = require(path.resolve(SOURCE_DIR, "scripts.json")); +import path from "path"; +import fs from "fs"; + +const scripts = JSON.parse( + fs.readFileSync( + path.resolve("./src/scripts.json"), + ), +); const formattedScripts = {}; @@ -14,4 +20,4 @@ for (const scriptType in scripts) { } } -module.exports = formattedScripts; +export default formattedScripts; |
