You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
745 B
29 lines
745 B
"use strict";
|
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
value: true
|
|
});
|
|
exports.default = getPaths;
|
|
|
|
function getPaths(context) {
|
|
const {
|
|
stats,
|
|
options
|
|
} = context;
|
|
const childStats = stats.stats ? stats.stats : [stats];
|
|
const publicPaths = [];
|
|
|
|
for (const {
|
|
compilation
|
|
} of childStats) {
|
|
// The `output.path` is always present and always absolute
|
|
const outputPath = compilation.getPath(compilation.outputOptions.path);
|
|
const publicPath = options.publicPath ? compilation.getPath(options.publicPath) : compilation.outputOptions.publicPath ? compilation.getPath(compilation.outputOptions.publicPath) : "";
|
|
publicPaths.push({
|
|
outputPath,
|
|
publicPath
|
|
});
|
|
}
|
|
|
|
return publicPaths;
|
|
}
|