GithubHelp home page GithubHelp logo

Comments (7)

antfu avatar antfu commented on August 19, 2024

The history field is automated by SSG, and we omit the type from it where you should already see the TypeScript warnings. But I also understand what you are trying to achieve, so since 0.8.10, now you can have this instead:

export const createApp = ViteSSG(
  App,
  { 
    routes, 
    base: 'dist',
  },
  (ctx) => {
    // install all modules under `modules/`
    Object.values(import.meta.globEager('./modules/*.ts')).map(i => i.install?.(ctx))
  },
)

from vite-ssg.

frck006 avatar frck006 commented on August 19, 2024

Thank you. The build works.

Yes, I try to put the result of the build in Tomcat application.
I changed the "base" and the URL 'http://localhost:8080/dist' is ok but 'js' are always in "http://localhost:8080/assets".
It should be 'http://localhost:8080/dist/assets', no ?

image

from vite-ssg.

antfu avatar antfu commented on August 19, 2024

This base is for vue-router only. Where you will also need to configure the base for Vite to achieve what you want.

from vite-ssg.

frck006 avatar frck006 commented on August 19, 2024

In "vite.config.ts" ?

from vite-ssg.

antfu avatar antfu commented on August 19, 2024

https://vitejs.dev/config/#base

Please read the docs

from vite-ssg.

frck006 avatar frck006 commented on August 19, 2024

Oups, you're right.

Can I suggest that the default value for vue-router's base could be the same from vite.config's base ?

from vite-ssg.

rainmanhhh avatar rainmanhhh commented on August 19, 2024

so it's impossible to use createWebHashHistory?

from vite-ssg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.