Error with Vue. How to launch js scripts?

Hello!
(for some reason the first time failed to post the entire question, only part of the was displayed)
For the first time started to use the Webpack, Vue, Node.js (for me is a dense forest, put for writing chat), before all js scripts in templates the connected blade through the script tag.
In the console project, run npm run dev. Further added
<example-component></example-component>
<script src="{{ asset('js/app.js') }}"></script>

to your pages. ExampleComponent.vue js/app.js, js/bootstrap.js webpack.mix.js does not changed.

Vue component is displayed on the page, but now does not work any other js scripts in templates the connected blade (either external or internal). In the console writes the following error:
[Vue warn]: Error compiling template:
Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.

// here red writes the whole code of my script that is attached on the page

(found in <Root>)


Tell me why my js script is not even loaded with the page, and is loaded only app.js? How do I get them to boot again?
April 3rd 20 at 18:35
2 answers
April 3rd 20 at 18:37
Solution
<div id="app"> </div> was a child of the body element and contained already all the rest of the content, including my js-scripts.
I moved all the js scripts outside of the container. And all scripts work.
April 3rd 20 at 18:39
Connect your component though?)
5dfa72d969f18056379723.png
No, there is ExampleComponent, he is by default already spelled out everywhere, including in vue-stubs\app.js.
The problem is NOT with the component. And with js scripts attached in blade templates.
To add a row
<script src="{{ asset('js/app.js') }}"></script>
in templates all my js scripts are working. After adding - stopped working in the console error and the component vue works. The other components I was hooked. - ole.Gutkowski61 commented on April 3rd 20 at 18:42

Find more questions by tags Vue.js