vuetifyjs / nuxt

Nuxt.js + Vuetify.js starter project template.
MIT License
306 stars 109 forks source link

Vuetify codemap not found #62

Open imShara opened 5 years ago

imShara commented 5 years ago
Source map error: request failed with status 404
Resource URL: http://localhost:3000/_nuxt/vendors.app.js
Source Map URL: vuetify.js.map

Part of http://localhost:3000/_nuxt/vendors.app.js

module.exports = __WEBPACK_EXTERNAL_MODULE_vue__;

/***/ })

/******/ })["default"];
});
//# sourceMappingURL=vuetify.js.map

/***/ }),
Thfona commented 5 years ago

I'm having the same issue, have you found a solution?

bitk0der commented 5 years ago

Same here, any solution?

imShara commented 5 years ago

I know why this happens, but don't know to fix it properly. Will try to describe.

There is sourceMappingURL path at end of .js file

blablascript
// # sourceMappingURL=script.js.map

Webpack builds all scripts into vendors.app.js and there is sourceMappingURL of scripts too.

Browser tries to find source map file at relative path, but there is no that files. Then, if we will change source maps paths to root-oriented

blablascript
// # sourceMappingURL=/script.js.map

and put sourcemaps to /static dir, browser can find this files and error will gone.

Why nuxt/webpack doesn't cut it from vendors.app.js? Why not to build vendors.app.js.map?