Skip to content

how to deploy project to the sub path? #406

Answered by jakobrosenberg
yangshangbo asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry about the delay on this. The last few days were crazy. 😅
I've created an example here

Alternatively you can also create the router in the script
<script>
    import { Router, createRouter } from '@roxi/routify'
    import routes from '../.routify/routes.default.js'

    const router = createRouter({
        routes,
        urlRewrite: {
            toExternal: url => '/subpath' + url,
            toInternal: url => url.replace(/^\/subpath/, ''),
        },
    })
</script>

<Router {router} />

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
5 replies
@yangshangbo
Comment options

@jakobrosenberg
Comment options

@ghostdevv
Comment options

@jakobrosenberg
Comment options

@ghostdevv
Comment options

Comment options

You must be logged in to vote
1 reply
@yangshangbo
Comment options

Answer selected by yangshangbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants