Skip to content

Commit

Permalink
fix(shell): use relative path to logo image
Browse files Browse the repository at this point in the history
- cleanup
  • Loading branch information
olegshilov committed Feb 19, 2024
1 parent 763e2b1 commit 2dda1c9
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 65 deletions.
70 changes: 39 additions & 31 deletions apps/shell/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,43 @@ const { ProvidePlugin, DefinePlugin } = require('webpack');
const { merge } = require('webpack-merge');

// Nx plugins for webpack.
module.exports = composePlugins(withNx(), withReact(), async (config) => {
return merge(config, {
plugins: [
new ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new DefinePlugin({
'process.env.GIT_COMMIT_SHA': JSON.stringify(
process.env['GIT_COMMIT_SHA'] ??
process.env['NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA'] ??
process.env['VERCEL_GIT_COMMIT_SHA'] ??
'dev',
),
}),
],
node: { global: true },
resolve: {
fallback: {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
http: false,
zlib: false,
https: false,
url: false,
},
module.exports = composePlugins(
withNx({
nx: {
svgr: false,
},
});
});
}),
withReact(),
async (config) => {
return merge(config, {
plugins: [
new ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new DefinePlugin({
'process.env.GIT_COMMIT_SHA': JSON.stringify(
process.env['GIT_COMMIT_SHA'] ??
process.env['NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA'] ??
process.env['VERCEL_GIT_COMMIT_SHA'] ??
'dev',
),
}),
],
node: { global: true },
resolve: {
fallback: {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
http: false,
zlib: false,
https: false,
url: false,
},
},
});
},
);
70 changes: 39 additions & 31 deletions apps/shell/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,43 @@ const { ProvidePlugin, DefinePlugin } = require('webpack');
const { merge } = require('webpack-merge');

// Nx plugins for webpack.
module.exports = composePlugins(withNx(), withReact(), async (config) => {
return merge(config, {
plugins: [
new ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new DefinePlugin({
'process.env.GIT_COMMIT_SHA': JSON.stringify(
process.env['GIT_COMMIT_SHA'] ??
process.env['NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA'] ??
process.env['VERCEL_GIT_COMMIT_SHA'] ??
'dev',
),
}),
],
node: { global: true },
resolve: {
fallback: {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
http: false,
zlib: false,
https: false,
url: false,
},
module.exports = composePlugins(
withNx({
nx: {
svgr: false,
},
});
});
}),
withReact(),
async (config) => {
return merge(config, {
plugins: [
new ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new DefinePlugin({
'process.env.GIT_COMMIT_SHA': JSON.stringify(
process.env['GIT_COMMIT_SHA'] ??
process.env['NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA'] ??
process.env['VERCEL_GIT_COMMIT_SHA'] ??
'dev',
),
}),
],
node: { global: true },
resolve: {
fallback: {
buffer: false,
crypto: false,
events: false,
path: false,
stream: false,
string_decoder: false,
http: false,
zlib: false,
https: false,
url: false,
},
},
});
},
);
1 change: 0 additions & 1 deletion libs/shell/ui-kit/src/assets/images/logo.svg

This file was deleted.

Binary file removed libs/shell/ui-kit/src/assets/images/sunrise.webp
Binary file not shown.
3 changes: 1 addition & 2 deletions libs/shell/ui-kit/src/components/header/header.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ReactNode, useCallback } from 'react';
import clsx from 'clsx';
import { NavLink, useLocation } from 'react-router-dom';
import logoImageData from '../../assets/images/logo.svg';

export function Header({
rightSlot,
Expand Down Expand Up @@ -53,7 +52,7 @@ export function Header({
>
<div className="relative h-[26px] w-[26px] sm:h-[32px] sm:w-[32px]">
<NavLink to="/">
<img src={logoImageData} alt="HAQQ" />
<img src="/assets/logo.svg" alt="HAQQ" />
</NavLink>
</div>
</div>
Expand Down

0 comments on commit 2dda1c9

Please sign in to comment.