Creating a dev distribution with source files and source maps
I would like to create a dev build of the application. The application was built with the Quasar CLI and I use the dev and build commands. However, when I use dev I have no file-system access to the resources and when I use build the resources are uglified and un-mapped to my original “.vue” files. How can I create a build config for a development version of the dist folder?
Hey, could you elaborate a bit on your use case?
So you want to have a build with none uglified files and source mapping?
devcommand spins up a development web server and serves the files as requested, so it is not made for distributing these files.
Your best option is to either alter the build configuration, as I described here: http://forum.quasar-framework.org/topic/677/quasar-build-without-minimize-the-files/3
or to create a new webpack configuration.
One use case may be to debug the code step by step with vscode, for example. Currently it is unable to find the source maps, probably because they are served on the fly
This should work also with the dev server, however, I was not able to achieve this with VS Code, but it worked with Jetbrains IDEs.
Have you tried using https://github.com/vuejs/vetur? Lots of people are claiming that it works out of the Box
I am using vetur, but I didn’t saw any option for debugging. I’ll check it out again
Look into source maps overrides for VS Code: https://github.com/vuejs/vetur/issues/201#issuecomment-312561313
Thank you all for your replies, but really I just want a stand-alone bundle that I can deploy somewhere and debug with Chrome. Something I can use to demonstrate with and so forth. If anyone knows how to pack the vue files into the dist directory that would be great.
@dewdad Look again at my first answer, the link I gave you is how to alter the build config that it is not minified.
In addition edit the config object in
config/index.js, look for
productionSourceMap: falseand change it to
trueand you should be ready to go.
I’ve already followed this path, sorry for not clarifying. This still leaves me without the vue files and even if I leave the workspace to wrap the bundle the links in the sourcemaps are somehow broken and the vue files referenced are incomplete. Actually the referenced files only contain the style block (CSS).
Hm… strange, for me the Sourcemaps worked also for
What do you mean by
This still leaves me without the vue files