Static site generation for an embedded web application
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
Hello Vercel team,
I used the next CLI to create a simple TypeScript app, yet I am having issues viewing the example website when navigating to the generated
How can I configure paths on the website to use the local directory rather than
I used the next CLI to create a simple TypeScript app, yet I am having issues viewing the example website when navigating to the generated
index.html file on my local machine.How can I configure paths on the website to use the local directory rather than
/?10 Replies
Cape lionOP
I am looking into potentially using Next.js for my embedded web app, so this way of accessing the website is imperative for my use case
This is my Next.js config
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'export',
};
export default nextConfig;@Cape lion Hello Vercel team,
I used the next CLI to create a simple TypeScript app, yet I am having issues viewing the example website when navigating to the generated `index.html` file on my local machine.
How can I configure paths on the website to use the local directory rather than `/`?
i don't think that is possible. nextjs is built on the http:// protocol so using file:// is not possible
you need to run something like [
serve](https://github.com/vercel/serve) or Python's SimpleHTTPServer to serve the files in a serverthen use the http(s):// protocol to access that server
Cape lionOP
Ahh alright. So Next.js is fundamentally made to be hosted on a server, and can't be configured for a file:// protocol? I guess that even if we're able to configure it for a file:// protocol, I may run into roadblocks down the road if Next.js is fundamentally built with that paradigm in mind
yeah it is a web framework. everything on the web revolves around http
Cape lionOP
I guess I'll need to build a custom react app then
I'll leave this Q open in case anyone else has ideas