Skip to content

Commit

Permalink
Fix asset loading for web (#2323)
Browse files Browse the repository at this point in the history
* Updates for assets.

* Newline.

Co-authored-by: phix <[email protected]>
Co-authored-by: Willy Lulciuc <[email protected]>
  • Loading branch information
3 people authored Dec 15, 2022
1 parent ef68ee5 commit a2a63ae
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
9 changes: 2 additions & 7 deletions web/src/components/header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import MqText from '../core/text/MqText'
import NamespaceSelect from '../namespace-select/NamespaceSelect'
import React, { ReactElement } from 'react'
import Search from '../search/Search'
import marquez_logo from './marquez_logo.svg'

const styles = (theme: Theme) => {
return createStyles({
Expand Down Expand Up @@ -47,13 +48,7 @@ const Header = (props: HeaderProps): ReactElement => {
<Toolbar>
<Box className={classes.innerToolbar}>
<Link to='/'>
<img
src={
'https://raw.githubusercontent.com/MarquezProject/marquez/main/web/src/img/marquez_logo.svg'
}
height={48}
alt='Marquez Logo'
/>
<img src={marquez_logo} height={48} alt='Marquez Logo' />
</Link>
<Box display={'flex'} alignItems={'center'}>
<Search />
Expand Down
File renamed without changes
2 changes: 2 additions & 0 deletions web/styles.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ declare module '*.css' {
const content: any;
export = content;
}

declare module '*.svg';
5 changes: 4 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"downlevelIteration": true,
"resolveJsonModule": false
},
"include": ["./src/**/*"],
"include": [
"./src/**/*",
"styles.d.ts"
],
"exclude": ["./src/__tests__/*"]
}
11 changes: 3 additions & 8 deletions web/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,7 @@ module.exports = {
},
{
test: /\.(png|jpe?g|gif|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img/'
}
}]
loader: 'file-loader'
},
{
test: /\.(woff(2)?|ttf|eot|otf)(\?v=\d+\.\d+\.\d+)?$/,
Expand All @@ -60,6 +54,7 @@ module.exports = {
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
path: path.resolve(__dirname, 'dist'),
publicPath: '/'
}
};

0 comments on commit a2a63ae

Please sign in to comment.