Build and Deployment
Methanol generates purely static artifacts, allowing the dist/ directory to be hosted on any standard static web server or hosting provider.
Executing a Build
npx methanol build
This command triggers an optimized build and populates the dist/ directory with the resulting files.
Local Preview
npx methanol serve
Use this command to validate the production artifacts in a local environment prior to deployment.
Deployment Strategy
Upload the contents of the dist/ folder to your preferred hosting service, such as GitHub Pages, Netlify, Cloudflare Pages, Amazon S3, or any specialized static host.
Deploying to a Subpath
If your site is to be served from a subpath (e.g., https://example.com/docs/), configure the site.base property in methanol.config.*:
export default () => ({
site: {
base: '/docs/'
}
})
During development (methanol dev), the site.base setting is ignored and the site is served from the root /. To verify subpath behavior, use the methanol build and methanol serve workflow.