vuejs / vitepress

Vite & Vue powered static site generator.
https://vitepress.dev
MIT License
13.15k stars 2.12k forks source link

Add option to generate pure HTML/CSS/JS website. #2829

Closed otabekoff closed 1 year ago

otabekoff commented 1 year ago

Is your feature request related to a problem? Please describe.

I was going to make a documentation application using VitePress. So, I've made my website and then build it to get final files in the dist folder. Then, I tried to load that page as WebView in Flutter. But only HTML content is being displayed. No CSS is working. And also media files are not displaying. I think JS files are also not being loaded. This is happening when I open website with browser. It is only working with local server/host or web servers.

Describe the solution you'd like

Add option for generating final code files like general websites that are openable by browser too.

Describe alternatives you've considered

  1. I've tried to build as MPA(Multi Page Application). But didn't work.
  2. I've changed the paths of images and CSS files from /file-path/file-name.extension to ./file-path/file-name.extension and it worked.

Additional context

No response

Validations

brc-dd commented 1 year ago

You can use some flutter plugin like this instead: https://inappwebview.dev/docs/in-app-localhost-server/

x-ref: https://stackoverflow.com/a/61981071/11613622

We don't plan to support relative base in near future. It would need a lot of refactoring.