mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 09:26:45 +00:00
remove file loader as dependency (#5012)
This commit is contained in:
parent
47b6d19de8
commit
0a511e6155
@ -32,7 +32,6 @@
|
||||
"eventemitter3": "1.2.0",
|
||||
"exports-loader": "0.7.0",
|
||||
"express": "4.13.1",
|
||||
"file-loader": "6.2.0",
|
||||
"file-saver": "2.0.5",
|
||||
"git-rev-sync": "3.0.2",
|
||||
"html2canvas": "1.4.1",
|
||||
|
@ -109,25 +109,24 @@ const config = {
|
||||
]
|
||||
},
|
||||
{
|
||||
test: /\.(jpg|jpeg|png|svg|ico|woff|woff2?|eot|ttf)$/,
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath(url, resourcePath, context) {
|
||||
if (/\.(jpg|jpeg|png|svg)$/.test(url)) {
|
||||
return `images/${url}`;
|
||||
}
|
||||
|
||||
if (/\.ico$/.test(url)) {
|
||||
return `icons/${url}`;
|
||||
}
|
||||
|
||||
if (/\.(woff|woff2?|eot|ttf)$/.test(url)) {
|
||||
return `fonts/${url}`;
|
||||
} else {
|
||||
return `${url}`;
|
||||
}
|
||||
}
|
||||
test: /\.(jpg|jpeg|png|svg)$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'images/[name][ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.ico$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'icons/[name][ext]'
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(woff|woff2?|eot|ttf)$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'fonts/[name][ext]'
|
||||
}
|
||||
}
|
||||
]
|
||||
@ -135,4 +134,5 @@ const config = {
|
||||
stats: 'errors-warnings'
|
||||
};
|
||||
|
||||
// eslint-disable-next-line no-undef
|
||||
module.exports = config;
|
||||
|
Loading…
x
Reference in New Issue
Block a user