Skip to content

Commit

Permalink
assets folder and alias
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Nov 22, 2023
1 parent 5c0d220 commit 8a37ac2
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"import/no-relative-packages": "error",
"import/no-relative-parent-imports": [
"error",
{ "ignore": ["#[src,root,components,pages,plugins,context,types]/*"] }
{ "ignore": ["#[src,root,components,pages,assets,plugins,context,types]/*"] }
],
"import/no-self-import": "error",
"import/no-unresolved": "error",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"#src/*": "./src/*",
"#components/*": "./src/components/*",
"#pages/*": "./src/pages/*",
"#assets/*": "./src/assets/*",
"#plugins/*": "./renderer/plugins/*",
"#context/*": "./renderer/context/*",
"#types/*": "./types/*"
Expand Down
2 changes: 1 addition & 1 deletion renderer/_default.page.server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { renderToString as renderToString_ } from '@vue/server-renderer'
import { escapeInject, dangerouslySkipEscape } from 'vike/server'

import logoUrl from '#components/logo.svg'
import logoUrl from '#assets/favicon.ico'

import { createApp } from './app'

Expand Down
File renamed without changes.
Binary file added src/assets/it4c-logo2-clean-bg_alpha-128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/components/PageShell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="layout">
<div class="navigation">
<a href="/" class="logo">
<img src="./logo.svg" height="64" width="64" alt="logo" />
<img :src="Logo" height="64" width="64" alt="logo" />
</a>
<VikeLink href="/">Home</VikeLink>
<VikeLink href="/about">About</VikeLink>
Expand All @@ -16,6 +16,8 @@
</template>

<script lang="ts" setup>
import Logo from '#assets/it4c-logo2-clean-bg_alpha-128x128.png'
import VikeLink from './VikeLink.vue'
</script>

Expand Down
36 changes: 0 additions & 36 deletions src/components/logo.svg

This file was deleted.

1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"#src/*": ["./src/*"],
"#components/*": ["./src/components/*"],
"#pages/*": ["./src/pages/*"],
"#assets/*": ["./src/assets/*"],
"#plugins/*": ["./renderer/plugins/*"],
"#context/*": ["./renderer/context/*"],
"#types/*": ["./types/*"]
Expand Down
1 change: 1 addition & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const config: UserConfig = {
'#src': path.join(__dirname, '/src'),
'#components': path.join(__dirname, '/src/components'),
'#pages': path.join(__dirname, '/src/pages'),
'#assets': path.join(__dirname, '/src/assets'),
'#plugins': path.join(__dirname, '/renderer/plugins'),
'#context': path.join(__dirname, '/renderer/context'),
'#types': path.join(__dirname, '/types'),
Expand Down

0 comments on commit 8a37ac2

Please sign in to comment.