-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
outputDir config not working #2639
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Oh, after these steps it worked:
|
hmmm, now trying to build on vue ui it uses the default |
Next to the button to execute the build command there's a settings dialog which contains the output dir. Clear that value and |
changing it within
|
I just had the same problem. It's indeed happening when using the default build task on the UI. The reason is that this task has actually an output directory My fix so far is to just set that parameter to an empty string so that the build task use the value from edit: actually same fix as edgraff. sorry for repeat |
I thought this parameter under build was confusing as well, shouldn't it be empty as default in stead of overriding as default? |
Wait, this seems crazy to me. @LinusBorg Shouldn't vue.config.js be the source of truth? Or at least if you're building through the UI, the parameters should be read/copied from vue.config.js? You can literally set the `outputDir' (or some other configuration) one screen up in the UI, and it's completely ignored if you run the tasks one screen down. |
I would say it's the other way around, because those params in the gui are indeed comandline parameters so they are meant to override main config on the fly.
This however makes sence because it's what normally should be expected, values should extend from vue.config if any, and fallback to "default values" only if there is not settings yet. |
What I expected when I encountered this issue is that vue.config.js was used to determine the output dir. The GUI shouldn’t have a default value set to /dist. It’s confusing because:
An empty outputDir for the GUI seems to be a more sensible default imo, fallbacking this to vue.config.js |
If anyone else has this problem I solved it by using |
I don't understand what the point is in the VUE CLI This is the description in the CLI Tools when you click on
Note that it specifically says https://cli.vuejs.org/config/#outputdir does not mention anything about the config value for this parameter having to be set in HOWEVER
For my GitHub templates this bug in the Clearly there is some inconsistency between the documentation and what is actually happening vs what is expected to happen. I tried searching around for any specific instructions that explicitly described the usage of Every time I start a new VUE project many months later, I find my self reading the docs, going through the settings, doing what I am told and it not working... then eventually remember "I had this issue last time what was the fix?" and I have to rediscover what I did to get it working. Every year that I have googled this issue this thread comes up as top result and the dagavu starts and always ends with the question of I don't know why @LinusBorg closed this issue and not address it? |
Good question. I can't answer it as that was over a year ago. Sorry :( Just a quick note:
That's likely just a small inaccuracy in the docs. Just like the UI (like the CLI itself) will write changes to the config to either Sidenote: From reading he following, it seems to me that you are unaware of that second option:
But at the very top of that page it say (highlighting mine):
Concerning your actual issue: Unfortunately I have a bit of a problem following your explanation of what exactlky does and doesn't work, so I'll try to repeat: The problem, according to what you experience, is basically that the "override hardcoded arguments" option is deactivated in the UI, but nonetheless works as if it's active, that means: the build command that the UI runs will use what is defined in the |
Correct sir. The deactivated override is overriding the value of my setting of |
Got it, thanks. |
By they way you just mentioned that the settings in that It is not doing that, it actually saves all of those settings to |
No, I mean the actual config values, under the "Configuration" page ( |
Understood, Yes those work as expected then, thanks for clarity on this. |
FYI the "override hardcoded arguments" is about arguments in the scripts in |
Version
3.0.4
Reproduction link
https://github.com/oswaldofreitas/vuecli_outputdir_issue
Node and OS info
Node 10.11.0 / npm 6.4.1 / macOS Mojave 10.14
Steps to reproduce
What is expected?
built files created in the new output folder
What is actually happening?
files are still created in the default "dist" folder
I tried changing outputDir value to:
and none worked
The text was updated successfully, but these errors were encountered: