Skip to content

Commit

Permalink
add possibility to change node dirname option dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
BenedyktT committed Jun 2, 2021
1 parent 0d96782 commit abab2a0
Show file tree
Hide file tree
Showing 3 changed files with 8,274 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module.exports = {
externals: ["knex", "sharp"],
// Set default file extensions to use the raw-loader with
rawFileExtensions: ["pem", "txt"],
sourceType: "module" // "script" | "module" | "unambiguous"
sourceType: "module", // "script" | "module" | "unambiguous"
nodeDirname: false
}
};
3 changes: 2 additions & 1 deletion src/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const forceExclude = config.options.forceExclude;
const ignorePackages = config.options.ignorePackages;
const rawFileExtensions = config.options.rawFileExtensions;
const sourceType = config.options.sourceType;
const nodeDirname = config.options.nodeDirname;
const fixPackages = convertListToObject(config.options.fixPackages);
const tsConfigPath = path.resolve(servicePath, config.options.tsConfig);

Expand Down Expand Up @@ -438,6 +439,6 @@ module.exports = ignoreWarmupPlugin({
{ minimize: false },
plugins: plugins(),
node: {
__dirname: false
__dirname: nodeDirname
}
});
Loading

0 comments on commit abab2a0

Please sign in to comment.