Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local setup: How to run demo.html & standalone.html without build ? #261

Open
majoshi1 opened this issue Oct 9, 2024 · 3 comments
Open
Labels
docs Improvements or additions to documentation

Comments

@majoshi1
Copy link

majoshi1 commented Oct 9, 2024

I cloned the repo and could run examples. But also see files demo.html/demo.tsx under packages/zudoku folder. Is it possible to run demo.html, in local?

OS: Windows 10.
Client: Git Bash

$ git clone https://github.com/zuplo/zudoku.git
$ pnpm i
$ export ZUDOKU_INTERNAL_DEV=1
$ nx run with-openapi-json:dev    # Works fine

$ cd packages/zudoku

$ npm run build:standalone:vite   # Works fine
> [email protected] build:standalone:vite
> vite build --mode standalone --config vite.standalone.config.ts
. . .
✓ built in 1m 33s

$ npm run build:standalone:html   # Works fine
. . .

$ npx vite src/app/demo.html --port 3000    # Fails
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

Copy link

linear bot commented Oct 9, 2024

@dan-lee
Copy link
Contributor

dan-lee commented Oct 12, 2024

What I do is:

nx run zudoku:build:ci
npx serve@latest packages/zudoku/standalone

// then open this for example:
http://localhost:3000/demo?api-url=https://rickandmorty.zuplo.io/openapi.json

This serves as an example for how to use it with HTML (see docs) and we use it on zudoku.dev to serve the demo.

@majoshi1
Copy link
Author

Thanks for the details. I could run it. Although, the page does not update if I make any change in code e.g. DemoAnnouncement.tsx. It worked only after I repeated above steps. Is it possible to make changes and test them simultaneously?

@ntotten ntotten added the docs Improvements or additions to documentation label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Development

No branches or pull requests

3 participants