-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Add prop in vue.config.js to change vue src directory (copy) #3062
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
@sodatea In regards to your comment. That is why there are defaults and the options only need to be mentioned in the docs. The applicability is for existing and complex apps. As well as, existing projects migrating from another front end framework to VueJS. As @sam3d mentioned there are no cons that I can think of or mentioned by @sodatea or @LinusBorg and is no different than the I've currently run into this situation with all of the existing apps where I was adding VueJS or upgrading VueJS. If later on you add another feature that requires the Code wise, having it one variable to make these changes is beneficial to all, including to additional.
@yyx990803 In regards to your comment, I believe greater adoption will happen with VueJS if it wasn't so constrained and hard coded in the I disagree with your first point.
Most businesses are not going to start new and re-program all their logic. Nor do only a SPA. Existing projects may already have the I would like to point out to point 3.
The defaults will exist no issues with keeping it consistent with new projects. No con here. Point 3 also seems to indicate a complete disregard and understanding to existing projects. No business is going to rebuild an existing project to fit Vue JS's structure. If you allow it to easily be customized it will lead to greater adoption as well as greater chances of keeping Vue JS up to date with the newest version. A fragmented ecosystem is not in the best interest for Vue JS. I lastly respectfully disagree with your point 4.
This option(s) easily allow for these changes as well as make it easier for any additional changes to the vue-cli that may require this path. It is set in one place and not hard coded to BTW @yyx990803 and team keep up the good work with Vue! |
Why the duplicate? |
What problem does this feature solve?
I apologize. The previous issue had comments disabled as I was in the middle of responding to the comments by @sodatea and @yyx990803 . There is confusion that I'm trying to address. I'm talking about existing projects see my comment below. I think it's in the best interest and for increased adoption of Vue JS that a thorough discussion from both sides is had instead of ending it prematurely before I even had a chance to respond. I understand wanting to limit for new projects, but existing projects is where greater adoption for Vue JS is. It will also allow for existing projects to transition from another front end to Vue JS slowly without having to re-write an entire app. Businesses aren't going to spend a bunch of money upfront to rewrite an entire app. A slow transition is more feasible. See my comment below...
Feature
Having the Vue src files and directories in the /src directory works for simple projects, but for more complex projects it doesn't work as well. If you're including the Vuejs project in with another project with other programming languages that follow a different or same src dir causes problems. This feature will separate the vue code from the other project code (js/PHP/C#/Go/python/etc.)
Currently if you want to modify the vue src directory you need to modify vue.config.js:
There might be other locations or properties that need to be updated with the change in src directory, but these 2 are the ones I've noticed so far.
There is the public directory that should also be considered. I assume it would also be moved into the specified Vue src directory or made into a separate web.config.js option.
If this is already doable without all the customization mentioned above, let me know.
What does the proposed API look like?
The value would be starting the current directory so you don't need to include the whole path.
Example: if you wanted to change the src vue directory and files from src to webclient/vue.
vue.config.js
The vue-cli would then change the vue src path where used by the cli-service.
The 3 places I've seen so far are:
Thanks!
Keep up the good work!
The text was updated successfully, but these errors were encountered: