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

Add VuePress template #1652

Merged
merged 7 commits into from
Apr 1, 2019
Merged

Add VuePress template #1652

merged 7 commits into from
Apr 1, 2019

Conversation

vicmeow
Copy link
Contributor

@vicmeow vicmeow commented Mar 25, 2019

What kind of change does this PR introduce?
VuePress starter template feature

What is the current behavior?
No VuePress 😞

What is the new behavior?
Get started with VuePress in CodeSandbox

Checklist:

  • Documentation
  • Importer
  • Tests
  • Ready to be merged
  • Added myself to contributors table

Feels like I'm way in over my head, but hope this will work! 😃
Would love to use VuePress with CodeSandbox in future projects and talks I have planned.

Not sure if I need to update any documentation, but from what I can tell I don't..?

@SaraVieira
Copy link
Contributor

@vicmeow
Copy link
Contributor Author

vicmeow commented Mar 25, 2019

It works as seen here: https://codesandbox.io/s/github/vicbergquist/codesandbox-vuepress/tree/master/

OH MY GOD! That's amazing, thank you!!

@SaraVieira
Copy link
Contributor

@CompuIves @lbogdan The view does not seem to reload, any idea why?

@lbogdan
Copy link
Contributor

lbogdan commented Mar 25, 2019

Yes, it's because the webpack dev server HMR websocket tries to connect to localhost:

image

@vicmeow
Copy link
Contributor Author

vicmeow commented Mar 26, 2019

Also, I'm trying to update the default file that is opened (
e0b8d4b), not sure if I have the right approach :(

For the reload issue and #1652 (comment), how can I help fix this?

Looking at the way ember and styleguidist support was done/added, I also made the PR in codesandbox-importer

@lbogdan
Copy link
Contributor

lbogdan commented Mar 26, 2019

@vicbergquist You'll have to configure webpack devserver to connect the HMR socket to the right URL. It's a combination of getting the host, disableHostCheck (and probably other settings?) right: https://webpack.js.org/configuration/dev-server/ .

I can also take a look at it somewhere this week.

@egoist
Copy link

egoist commented Mar 27, 2019

@ulivz we need to fix it here: https://github.com/vuejs/vuepress/blob/759195de7fc7caf1e5a50c80d449b2c5dfa45cd5/packages/%40vuepress/core/lib/node/dev/index.js#L237 or at least allow user to customize it, the webpack-dev-server client is trying to connect localhost but we should use location.host or simply /

@lbogdan
Copy link
Contributor

lbogdan commented Mar 27, 2019

Fixed here https://codesandbox.io/s/948mvov384 , by replacing host: this.host in https://github.com/vuejs/vuepress/blob/759195de7fc7caf1e5a50c80d449b2c5dfa45cd5/packages/%40vuepress/core/lib/node/dev/index.js#L223 with host: '0.0.0.0'.

@CompuIves
Copy link
Member

Hey! This is awesome, let me know when it's ready to merge!

ulivz added a commit to vuejs/vuepress that referenced this pull request Mar 31, 2019
@ulivz
Copy link

ulivz commented Mar 31, 2019

Hey, thanks to the great work, we have set the default port of VuePress to 0.0.0.0 which is available at (>=1.0.0-alpha.45), let me know if it works for you.

@lbogdan
Copy link
Contributor

lbogdan commented Mar 31, 2019

@ulivz Great, thanks! Updated to 1.0.0-alpha.46 and it seems to be working: https://codesandbox.io/s/948mvov384 .

@SaraVieira
Copy link
Contributor

Mergy 🎉🎉

@SaraVieira SaraVieira merged commit df8368a into codesandbox:master Apr 1, 2019
devs-cloud pushed a commit to devs-cloud/vue-dev that referenced this pull request Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants