Skip to content

Commit c18de31

Browse files
committed
Fix warnings during build
1 parent b50a10b commit c18de31

File tree

4 files changed

+23
-7
lines changed

4 files changed

+23
-7
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<link href="./src/styles/globals.css" rel="stylesheet">
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
88
<title>SugarLabs</title>
9-
<script src="./Randomfavicon.js" crossorigin="anonymous"></script>
109
</head>
1110
<body>
1211
<div id="root"></div>
1312
<script type="module" src="/src/main.tsx"></script>
13+
<script type="module" src="/Randomfavicon.js" crossorigin="anonymous"></script>
1414
</body>
1515
</html>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dev": "vite --host",
99
"build": "tsc -b && vite build",
1010
"lint": "eslint .",
11-
"preview": "vite preview",
11+
"preview": "vite preview --host",
1212
"predeploy": "npm run build",
1313
"deploy": "gh-pages -d dist",
1414
"lint:ts": "eslint 'src/**/*.{ts,tsx}'",

src/styles/globals.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
@font-face {
22
font-family: 'Caveat';
3-
src: url('../fonts/Caveat-Regular.ttf');
3+
src: url('/fonts/Caveat-Regular.ttf');
44
}
55
@font-face {
66
font-family: 'Roboto';
7-
src: url('../fonts/Roboto-Regular.ttf');
7+
src: url('/fonts/Roboto-Regular.ttf');
88
}
99
@font-face {
1010
font-family: 'Pacifico';
11-
src: url('../fonts/Pacifico-Regular.ttf');
11+
src: url('/fonts/Pacifico-Regular.ttf');
1212
}
1313
@font-face {
1414
font-family: 'AnonymousPro';
15-
src: url('../fonts/AnonymousPro-Regular.ttf');
15+
src: url('/fonts/AnonymousPro-Regular.ttf');
1616
}
1717
@font-face {
1818
font-family: 'Inter';
19-
src: url('../fonts/Inter_28pt-Regular.ttf');
19+
src: url('/fonts/Inter_28pt-Regular.ttf');
2020
}
2121

2222
@import 'tailwindcss';

vite.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,20 @@ export default defineConfig({
99
react(),
1010
tailwindcss(),
1111
],
12+
build: {
13+
rollupOptions: {
14+
/**
15+
* Ignore "use client" waning since we are not using SSR
16+
*/
17+
onwarn(warning, warn) {
18+
if (
19+
warning.code === "MODULE_LEVEL_DIRECTIVE" &&
20+
warning.message.includes(`"use client"`)
21+
) {
22+
return;
23+
}
24+
warn(warning);
25+
},
26+
},
27+
},
1228
})

0 commit comments

Comments
 (0)