123456789101112131415161718192021222324252627282930313233343536373839404142 |
- "use strict";
- function getPaths(context) {
- const {
- stats,
- options
- } = context;
-
- const childStats =
- stats.stats ? stats.stats : [( stats)];
- const publicPaths = [];
- for (const {
- compilation
- } of childStats) {
- if (compilation.options.devServer === false) {
-
- continue;
- }
-
- 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,
- assetsInfo: compilation.assetsInfo
- });
- }
- return publicPaths;
- }
- module.exports = getPaths;
|