mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Implemented utilities in React to make porting easier for pgAdmin tools.
This commit is contained in:
committed by
Akshay Joshi
parent
76a4dee451
commit
bc4e8a3c82
@@ -77,7 +77,7 @@ const copyFiles = new CopyPlugin({
|
||||
});
|
||||
|
||||
const imageMinimizer = new ImageMinimizerPlugin({
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
test: /\.(jpe?g|png|gif)$/i,
|
||||
minimizerOptions: {
|
||||
// Lossless optimization with custom option
|
||||
// Feel free to experiment with options for better result for you
|
||||
@@ -179,7 +179,24 @@ fs.writeFileSync(pgadminThemesJson, JSON.stringify(pgadminThemes, null, 4));
|
||||
|
||||
var themeCssRules = function(theme_name) {
|
||||
return [{
|
||||
test: /\.(jpe?g|png|gif|svg)$/i,
|
||||
test: /\.svg$/,
|
||||
oneOf: [
|
||||
{
|
||||
issuer: /\.[jt]sx?$/,
|
||||
resourceQuery: /svgr/,
|
||||
use: ['@svgr/webpack'],
|
||||
},
|
||||
{
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
maxSize: 4 * 1024, // 4kb
|
||||
}
|
||||
}
|
||||
},
|
||||
],
|
||||
},{
|
||||
test: /\.(jpe?g|png|gif)$/i,
|
||||
type: 'asset',
|
||||
parser: {
|
||||
dataUrlCondition: {
|
||||
@@ -191,7 +208,7 @@ var themeCssRules = function(theme_name) {
|
||||
},
|
||||
exclude: /vendor/,
|
||||
},{
|
||||
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||
test: /\.(eot|ttf|woff|woff2)$/,
|
||||
type: 'asset/resource',
|
||||
generator: {
|
||||
filename: 'fonts/[name].[ext]',
|
||||
|
Reference in New Issue
Block a user