Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F95328309
IssueWebpackError.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Dec 14, 18:39
Size
1 KB
Mime Type
text/x-c++
Expires
Mon, Dec 16, 18:39 (2 d)
Engine
blob
Format
Raw Data
Handle
22969970
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
IssueWebpackError.js
View Options
"use strict"
;
var
__importDefault
=
(
this
&&
this
.
__importDefault
)
||
function
(
mod
)
{
return
(
mod
&&
mod
.
__esModule
)
?
mod
:
{
"default"
:
mod
};
};
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
});
const
path_1
=
require
(
"path"
);
const
IssueLocation_1
=
require
(
"./IssueLocation"
);
const
forwardSlash_1
=
__importDefault
(
require
(
"../utils/path/forwardSlash"
));
class
IssueWebpackError
extends
Error
{
constructor
(
message
,
issue
)
{
super
(
message
);
this
.
issue
=
issue
;
this
.
hideStack
=
true
;
// to display issue location using `loc` property, webpack requires `error.module` which
// should be a NormalModule instance.
// to avoid such a dependency, we do a workaround - error.file will contain formatted location instead
if
(
issue
.
file
)
{
this
.
file
=
forwardSlash_1
.
default
(
path_1
.
relative
(
process
.
cwd
(),
issue
.
file
));
if
(
issue
.
location
)
{
this
.
file
+=
`
:
$
{
IssueLocation_1
.
formatIssueLocation
(
issue
.
location
)}
`
;
}
}
Error
.
captureStackTrace
(
this
,
this
.
constructor
);
}
}
exports
.
IssueWebpackError
=
IssueWebpackError
;
Event Timeline
Log In to Comment