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

190
Views
(Vue3) Cuando realizo un cambio en el archivo js estático, no se refleja en la pantalla

Creé un proyecto vue3 vacío. Y creé global.js en el archivo público.

global.js;

 window.testPrint = "test message"; export default {}

vue.config.js;

 // vue.config.js /** * @type {import('@vue/cli-service').ProjectOptions} */ module.exports = { publicPath: "./" };

Aplicación.vue;

 <template> <p> {{getTest()}} </p> <div id="nav"> <router-link to="/">Home</router-link> | <router-link to="/about">About</router-link> </div> <router-view /> </template> <script> export default { methods: { getTest() { return window.testPrint; } } } </script> <style> #app { font-family: Avenir, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-align: center; color: #2c3e50; } #nav { padding: 30px; } #nav a { font-weight: bold; color: #2c3e50; } #nav a.router-link-exact-active { color: #42b983; } </style>

principal.js;

 import { createApp } from "vue"; import App from "./App.vue"; import router from "./router"; import store from "./store"; createApp(App).use(store).use(router).mount("#app"); import "../public/global.js";

En la salida de pantalla que construí y ejecuté en iis, window.testPrint = "mensaje de prueba"; conformado. Cuando cambio este valor en global.js y hago Ctrl+F5, la pantalla no cambia y aún permanece como "mensaje de prueba".

ingrese la descripción de la imagen aquí

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!