I created a simple vue project using vue create . and default settings for vue2.
//vue.config.js
module.exports = {
configureWebpack: {
entry: {
mvcapp: [
'./src/main-mvc.ts',
],
},
},
};
I have a simple code
// main-mvc.js
console.log('hello from mvc');
Now when running yarn serve its loading the app and showing the message in console. Till thats its fine.
Now I have another app (simple-app), in which there is sample.html file containing code
<script src="http://localhost:8080/js/mvcapp.js"></script>
While the vue project running, I also started the simple-app using the live-server. Loading the sample.html in browser is loading the main.mvc.js file without any error, but there is no console message.
Can someone point me whats wrong here? Why the main-mvc.js file is not running the code correctly if linked in some other app?
Here is the full code of the generated js: https://goonlinetools.com/snapshot/code/#txgbtna5tas75m4ctl3jud