aboutsummaryrefslogtreecommitdiffstats
path: root/config/webpack
diff options
context:
space:
mode:
authorArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-02-10 11:18:26 +0530
committerArpit Chakladar <54011232+arpitchakladar@users.noreply.github.com>2023-02-10 11:18:26 +0530
commit5bee39d850e42743c2396f2a1eb2891a8c7e3ff9 (patch)
tree096d3d49ffc252da5b564e6cf7ba72d4d25fc63a /config/webpack
parente674c14b08faae4fb2cb0ebf3c17029667af3c42 (diff)
downloadbanglar-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')
-rw-r--r--config/webpack/loaders/scoped-loader.js2
-rw-r--r--config/webpack/plugins/create-manifest-webpack-plugin/index.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/config/webpack/loaders/scoped-loader.js b/config/webpack/loaders/scoped-loader.js
index 1be58a4..c2f9636 100644
--- a/config/webpack/loaders/scoped-loader.js
+++ b/config/webpack/loaders/scoped-loader.js
@@ -1,6 +1,6 @@
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 getScriptType = scriptName => {
for (const scriptType in scripts) {
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] };