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

The vue example does not work #3122

Open
sobrborsen opened this issue Oct 13, 2021 · 2 comments
Open

The vue example does not work #3122

sobrborsen opened this issue Oct 13, 2021 · 2 comments
Assignees

Comments

@sobrborsen
Copy link

  • Laravel Mix Version: laravel-mix@6.0.34
  • Node Version (node -v): v12.21.0
  • NPM Version (npm -v): 7.5.2
  • OS: Ubuntu 21.04

Description:

Your very simple example does not work. I would expect the message from Alert to be displayed.

Steps To Reproduce:

  • Create a default laravel project with: composer create-project laravel/laravel delete-me
  • run npm install
  • run npm install vue
  • go to https://laravel-mix.com/docs/6.0/vue and follow the example with following changes
    • place the Alert.vue in resources/js
    • replace app.js with the content from the example
  • run npx mix twice
  • replace content in resource/view/welcome.blade.php with:
<!DOCTYPE html>
<html>
<body>
    <div id="app"></div>
    <script src="/js/app.js"></script>
</body>
</html>
  • start php -S localhost:8000 -t public
  • point your browser to localhost:8000
@thecrypticace
Copy link
Collaborator

You need to render the component: <div id="app"><alert></alert></div>.

But I can see how the example is confusing (and slightly inconsistent in its instructions). I'll make an update.

@sobrborsen
Copy link
Author

Thanks and it works :-)

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

No branches or pull requests

2 participants