Skip to content

Commit

Permalink
Fix base paths
Browse files Browse the repository at this point in the history
  • Loading branch information
RubenQ42 committed Oct 4, 2024
1 parent da04bf7 commit d8fccaa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions client/5.0/react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import path from 'node:path'
const rootDir = path.resolve(__dirname, '../../../');

// https://vitejs.dev/config/
export default defineConfig({
export default defineConfig(({ command }) => ({
plugins: [react()],
resolve: {
alias: {
'shared': path.resolve(rootDir, './shared'),
}
},
base: command === 'build' ? 'https://q42.github.io/Eicon.tech-station-game-poc/' : undefined,
build: {
outDir: path.resolve(rootDir, './dist/client/5.0/react'),
outDir: command === 'build' ? path.resolve(rootDir, './dist/client/5.0/react') : undefined,
}
})
}))
2 changes: 1 addition & 1 deletion client/5.0/svelte/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
// import '../app.css';
import '../app.css';
</script>

<slot />
2 changes: 1 addition & 1 deletion client/5.0/svelte/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<h2 id="demo">Demo</h2>
<span>
<a href="/demo">View demo</a> | <a href={githubRoot + "/src/examples/demo"}>View source</a>
<a href="demo">View demo</a> | <a href={githubRoot + "/src/examples/demo"}>View source</a>
</span>
</div>
</main>
2 changes: 1 addition & 1 deletion client/5.0/svelte/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = {
pages: process.argv.includes('dev') ? undefined : '../../../dist/client/5.0/svelte',
}),
paths: {
base: process.argv.includes('dev') ? '' : process.env.BASE_PATH
base: process.argv.includes('dev') ? undefined : '/Micrio.Templates/client/5.0/svelte'
},
}
};
Expand Down

0 comments on commit d8fccaa

Please sign in to comment.