Skip to content

Commit

Permalink
converts static paths into relative paths for boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
uguraslan committed Jan 12, 2024
1 parent 801756a commit 83dc2f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boilerplate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/index.js"></script>
<script type="module" src="src/index.js"></script>
</body>
</html>
20 changes: 17 additions & 3 deletions boilerplate/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,22 @@ Blits.Launch(App, 'app', {
debugLevel: 1,
fontLoader: fontLoader,
fonts: [
{family: 'lato', type: 'msdf', png: '/fonts/Lato-Regular.msdf.png', json: '/fonts/Lato-Regular.msdf.json'},
{family: 'raleway', type: 'msdf', png: '/fonts/Raleway-ExtraBold.msdf.png', json: '/fonts/Raleway-ExtraBold.msdf.json'},
{family: 'opensans', type: 'web', file: '/fonts/OpenSans-Medium.ttf'}
{
family: 'lato',
type: 'msdf',
png: 'fonts/Lato-Regular.msdf.png',
json: 'fonts/Lato-Regular.msdf.json',
},
{
family: 'raleway',
type: 'msdf',
png: 'fonts/Raleway-ExtraBold.msdf.png',
json: 'fonts/Raleway-ExtraBold.msdf.json',
},
{
family: 'opensans',
type: 'web',
file: 'fonts/OpenSans-Medium.ttf',
},
],
})
1 change: 1 addition & 0 deletions boilerplate/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import blitsVitePlugins from '@lightningjs/blits/vite'

export default defineConfig(({ command, mode, ssrBuild }) => {
return {
base: '/', // Set to your base path if you are deploying to a subdirectory (example: /myApp/)
plugins: [...blitsVitePlugins],
resolve: {
mainFields: ['browser', 'module', 'jsnext:main', 'jsnext'],
Expand Down

0 comments on commit 83dc2f4

Please sign in to comment.