vue-loader: Source maps are not working for me
I see *.vue files in the source tree, but with content is generated by webpack (Google Chrome Version 47.0.2526.111 64-bit):
var __vue_script__, __vue_template__
__vue_script__ = require("-!coffee!./../../../../node_modules/vue-loader/lib/selector.js?type=script&index=0!./Total.vue")
__vue_template__ = require("-!vue-html-loader!./../../../../node_modules/vue-loader/lib/selector.js?type=template&index=0!./Total.vue")
module.exports = __vue_script__ || {}
if (module.exports.__esModule) module.exports = module.exports.default
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ }
if (module.hot) {(function () { module.hot.accept()
var hotAPI = require("vue-hot-reload-api")
hotAPI.install(require("vue"), true)
if (!hotAPI.compatible) return
var id = "/full/path/to/Total.vue"
if (!module.hot.data) {
hotAPI.createRecord(id, module.exports)
} else {
hotAPI.update(id, module.exports, __vue_template__)
}
})()}
/*****************
** WEBPACK FOOTER
** ./app/components/cart/Total.vue
** module id = 27
** module chunks = 0 1 2 3
**/
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Comments: 20 (3 by maintainers)
Links to this issue
Commits related to this issue
- Workaround to get source maps work properly for vue components (see https://github.com/vuejs/vue-loader/issues/146) — committed to Darkside73/bbsmile.com.ua by Darkside73 11 years ago
- good god source maps https://github.com/vuejs/vue-loader/issues/146#issuecomment-877869882 — committed to thecodewarrior/style-color-helper by thecodewarrior 5 years ago
Invalid options in vue.config.js: "devtool" is not allowed😭Have to use
I narrowed down the problem. With default settings there are several files per each component in dev console:
One of it represents an actual source file. By adding
devtoolModuleFilenameTemplate: '[resource-path]?[loaders]'option I’ve figured out that source with loader like../~/vue-loader/lib/selector.js?type=script&index=0is an actual source.My workaround is pretty straightforward:
??? HOW TO RESOLVE THIS ???
HOW tO reSolVe THiS??? tHe sAme for ME !!!
VUEJS author ??? where are you? Dont close that …iiSUE
Aha, in
2.6.1breakpoints don’t work anymore in Chrome with eval sourcemaps, the workaround is in 2.7 (backported from 3).I had my script blackboxed in Chrome, after removing that I got it working with latest Chrome v60 +
eval-source-map+ Webpackv2.7.0.cheap-ones don’t map source correctly.Same issue is reproduced in freshly installed app via vue-cli