Skip to content

Commit

Permalink
fix(webpack): change fileReplacements to absolute path (#20433)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi authored Nov 27, 2023
1 parent 78ab39b commit a57122d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { resolve } from 'path';

import { normalizeAssets } from '../../../plugins/nx-webpack-plugin/lib/normalize-options';
import {
normalizeAssets,
normalizeFileReplacements,
} from '../../../plugins/nx-webpack-plugin/lib/normalize-options';
import type {
NormalizedWebpackExecutorOptions,
WebpackExecutorOptions,
Expand All @@ -21,6 +24,7 @@ export function normalizeOptions(
outputFileName: options.outputFileName ?? 'main.js',
assets: normalizeAssets(options.assets, root, sourceRoot),
webpackConfig: normalizePluginPath(options.webpackConfig, root),
fileReplacements: normalizeFileReplacements(root, options.fileReplacements),
optimization:
typeof options.optimization !== 'object'
? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export function normalizeAssets(
});
}

function normalizeFileReplacements(
export function normalizeFileReplacements(
root: string,
fileReplacements: FileReplacement[]
): FileReplacement[] {
Expand Down

0 comments on commit a57122d

Please sign in to comment.