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

↗️ Auto "open browser" option #257

Closed
4 tasks done
oneezy opened this issue Aug 20, 2022 · 3 comments
Closed
4 tasks done

↗️ Auto "open browser" option #257

oneezy opened this issue Aug 20, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@oneezy
Copy link

oneezy commented Aug 20, 2022

Clear and concise description of the problem

I want an option that will automatically open up the browser window when starting dev server or preview

I typically use --open in my package.json scripts but when trying to use this with Histoire it did not work.

Suggested solution

i.e.

  "scripts": {
    "story:dev": "histoire dev --port 6006 --open",
    "story:build": "histoire build",
    "story:preview": "histoire preview --port 6006 --open"
  },

Alternative

No response

Additional context

No response

Validations

@oneezy oneezy added the enhancement: to triage New feature of request pending review by team member label Aug 20, 2022
@oneezy oneezy changed the title Auto "open browser" option ↗️ Auto "open browser" option Aug 20, 2022
@oneezy
Copy link
Author

oneezy commented Aug 20, 2022

😆 , right after i submitted feature request i figured out how to do it.

Vite can do this easily from within the vite.config.js file

export default defineConfig({
  server: {
    open: '/' 
  }
})

https://vitejs.dev/config/server-options.html

@oneezy
Copy link
Author

oneezy commented Aug 20, 2022

you may or may not want to reimplement this functionality for histoire so i'll leave open for now

@Lyokolux
Copy link
Contributor

you may or may not want to reimplement this functionality for histoire so i'll leave open for now

Or document it on the histoire config page :)

@Akryum Akryum added enhancement New feature or request and removed enhancement: to triage New feature of request pending review by team member labels Feb 8, 2023
@Akryum Akryum closed this as completed in 876161b Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants