Skip to content

Instantly share code, notes, and snippets.

@VTacius
Last active July 15, 2018 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VTacius/cc14bd32e861a007d1408e5918fe2949 to your computer and use it in GitHub Desktop.
Save VTacius/cc14bd32e861a007d1408e5918fe2949 to your computer and use it in GitHub Desktop.
Notas sobre la transición a .vue files

Ante el error

TypeError: can't redefine non-configurable property "$router"

Basta con quitar la carga de script en el index.html (O cualquiera que sea la entrada para tu aplicación). Ahora, todo será cargado mediante webpack y nada más importa

Ante el error

[Vue warn]: Unknown custom element: <router-view> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

(found in <Root>)

Agregas lo siguiente a app.js (O cualquiera que sea el punto de entrada de tu aplicación), justo después de importar los componentes tales:

Vue.use(VueRouter);

Ante el error:

Error en el mapeo fuente: TypeError: sockjs.js.map is not a valid URL.
URL del recurso: webpack:///./node_modules/sockjs-client/dist/sockjs.js?
URL del mapa fuente: sockjs.js.map

Agregas los siguiente a module.export:

Error en el mapeo fuente: TypeError: sockjs.js.map is not a valid URL.
URL del recurso: webpack:///./node_modules/sockjs-client/dist/sockjs.js?
URL del mapa fuente: sockjs.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment