Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

308
Views
Trying to load a webpack generated file in other app is not working

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!