Skip to content

Commit 3ab01fa

Browse files
committed
#181027431 Move index.html to project root & style imported in source
1 parent 867925b commit 3ab01fa

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

public/index.html index.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@
55
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
8-
<link href="main.css" rel="stylesheet">
98
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta2/css/all.min.css" integrity="sha512-YWzhKL2whUzgiheMoBFwW8CKV4qpHQAEuvilg9FAn5VJUDwKZZxkJNuGM4XkWuk94WCrrwslk8yWNGmY1EduTA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
109
<link rel="preconnect" href="https://fonts.googleapis.com">
1110
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
1211
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap" rel="stylesheet">
1312
<title>Translate Tool</title>
1413
</head>
1514
<body class="bg-light">
16-
<script type="module" src="/dist/index.js"></script>
15+
<script type="module" src="/src/index.ts"></script>
1716
</body>
1817
</html>
1918
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

src/index.ts

+2-10
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import App from './App.svelte'
2+
import './main.css'
23

34
const app = new App({target: document.body,})
45

5-
export default app
6-
7-
// Hot Module Replacement (HMR) - Remove this snippet to remove HMR.
8-
// Learn more: https://www.snowpack.dev/concepts/hot-module-replacement
9-
if (import.meta.hot) {
10-
import.meta.hot.accept()
11-
import.meta.hot.dispose(() => {
12-
app.$destroy()
13-
})
14-
}
6+
export default app

public/main.css src/main.css

File renamed without changes.

vite.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import {defineConfig} from 'vite'
22
import {svelte} from '@sveltejs/vite-plugin-svelte'
3+
import * as path from 'path'
34

45
// https://vitejs.dev/config/
56
export default defineConfig({
7+
resolve: {
8+
alias: {
9+
'src': path.resolve(__dirname, './src'),
10+
}
11+
},
612
plugins: [svelte()]
713
})

0 commit comments

Comments
 (0)