Last change
on this file since 59329aa was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
745 bytes
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.default = getPaths;
|
---|
7 |
|
---|
8 | function getPaths(context) {
|
---|
9 | const {
|
---|
10 | stats,
|
---|
11 | options
|
---|
12 | } = context;
|
---|
13 | const childStats = stats.stats ? stats.stats : [stats];
|
---|
14 | const publicPaths = [];
|
---|
15 |
|
---|
16 | for (const {
|
---|
17 | compilation
|
---|
18 | } of childStats) {
|
---|
19 | // The `output.path` is always present and always absolute
|
---|
20 | const outputPath = compilation.getPath(compilation.outputOptions.path);
|
---|
21 | const publicPath = options.publicPath ? compilation.getPath(options.publicPath) : compilation.outputOptions.publicPath ? compilation.getPath(compilation.outputOptions.publicPath) : "";
|
---|
22 | publicPaths.push({
|
---|
23 | outputPath,
|
---|
24 | publicPath
|
---|
25 | });
|
---|
26 | }
|
---|
27 |
|
---|
28 | return publicPaths;
|
---|
29 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.