diff options
| author | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-02-10 11:18:26 +0530 |
|---|---|---|
| committer | Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> | 2023-02-10 11:18:26 +0530 |
| commit | 5bee39d850e42743c2396f2a1eb2891a8c7e3ff9 (patch) | |
| tree | 096d3d49ffc252da5b564e6cf7ba72d4d25fc63a /config/webpack/plugins/create-manifest-webpack-plugin/index.js | |
| parent | e674c14b08faae4fb2cb0ebf3c17029667af3c42 (diff) | |
| download | banglar-bhumi-utils-5bee39d850e42743c2396f2a1eb2891a8c7e3ff9.tar.gz banglar-bhumi-utils-5bee39d850e42743c2396f2a1eb2891a8c7e3ff9.zip | |
Using global object instead of process.env for common directory paths.
Diffstat (limited to 'config/webpack/plugins/create-manifest-webpack-plugin/index.js')
| -rw-r--r-- | config/webpack/plugins/create-manifest-webpack-plugin/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/config/webpack/plugins/create-manifest-webpack-plugin/index.js b/config/webpack/plugins/create-manifest-webpack-plugin/index.js index 2e121da..7852d62 100644 --- a/config/webpack/plugins/create-manifest-webpack-plugin/index.js +++ b/config/webpack/plugins/create-manifest-webpack-plugin/index.js @@ -1,16 +1,16 @@ const { sources } = require("webpack"); const path = require("path"); -const scripts = require(path.resolve(process.env.SOURCE_DIR, "scripts.json")); +const scripts = require(path.resolve(SOURCE_DIR, "scripts.json")); -const { version } = require(path.resolve(process.env.ROOT_DIR, "package.json")); +const { version } = require(path.resolve(ROOT_DIR, "package.json")); const { getScriptRuntimeFromType } = webpackRequire("utils/script-runtime"); const { getFileNameHash } = webpackRequire("utils/file-name-hash"); class CreateManifestPlugin { constructor() { this.scripts = {}; - this.manifest = require("./manifest-template.json"); + this.manifest = webpackRequire("plugins/create-manifest-webpack-plugin/manifest-template.json"); for (const scriptType in scripts) { const scriptRuntime = getScriptRuntimeFromType(scriptType); this.scripts[scriptRuntime] = { ...this.scripts[scriptRuntime], ...scripts[scriptType] }; |
