Skip to content
New issue

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

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

Already on GitHub? # to your account

Stuck at loading after adding vite config #2734

Open
rajiv-sah opened this issue Jul 25, 2024 · 1 comment
Open

Stuck at loading after adding vite config #2734

rajiv-sah opened this issue Jul 25, 2024 · 1 comment

Comments

@rajiv-sah
Copy link

rajiv-sah commented Jul 25, 2024

Describe the bug

The preview.js is stuck at loading after adding vite config
image

Reproduction

  1. Add a file preview.config.js
import { defineConfig } from '@previewjs/config';

export default defineConfig({
  vite: {
    define: {
      'process.env.API_URL': 'temp-sasa',
      __APP_ENV__: JSON.stringify({ API_URL: 'hello' }),
    },
  },
});

Preview.js version

v1.28.1

Framework

React 118.2.0

System Info

System:
    OS: macOS 14.5
    CPU: (8) arm64 Apple M2
    Memory: 87.70 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.4 - ~/.nvm/versions/node/v18.20.4/bin/node
    npm: 10.7.0 - ~/.nvm/versions/node/v18.20.4/bin/npm
    pnpm: 9.6.0 - ~/.nvm/versions/node/v20.15.1/bin/pnpm
  IDEs:
    VSCode: 1.91.1 - /usr/local/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Browsers:
    Brave Browser: 126.1.67.123
    Safari: 17.5

Used Package Manager

npm

Extension logs (useful for crashes)

no crash error

Preview logs (useful for rendering errors)

$ node --version
v20.15.1
✅ Detected compatible NodeJS version
🚀 Starting Preview.js daemon...
Streaming daemon logs to: /Users/rajiv.sah/.vscode/extensions/zenclabs.previewjs-1.28.1/dist/daemon-202407251518-60254.log
[ready] Preview.js daemon server is now running at http://localhost:60254
[15:18:51.885] INFO (86440): Created Preview.js workspace (plugin: @previewjs/plugin-react) at /Users/rajiv.sah/projects/
[15:18:51.890] INFO (86440): Preview.js server running at http://localhost:3140.

Repo link (if available)

No response

Anything else?

No response

@rajiv-sah
Copy link
Author

Now I am getting this
CleanShot 2024-07-25 at 21 48 56@2x

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant