Webpack: Better upgrade path

Created on 21 Jun 2016  路  6Comments  路  Source: vuejs-templates/webpack

I'm building something using this webpack template. I started maybe 4 months ago, and decided to try to upgrade my Vue.js webpack template files. It's turning out to be a very manual process. It would be good if "core" files were kept separate from files that are likely to be modified. I realize this is a template, and so, by definition, it is supposed to be changed by the user. But, for example, the user is likely not to change the build/ dir, but likely to make many changes in src/.

I don't have any easy solutions, I'm just thinking out loud here. But if the templates could be somehow designed to help ease this upgrade process, that would be good.

enhancement

Most helpful comment

This will be resolved with vue-cli v3, please follow the kick-off discussion here: https://github.com/vuejs/vue-cli/issues/589

All 6 comments

I've been thinking about that problem, but we do actually have a significant number of people changing files in the build directory. For example, I always add a prerendering step. Sainsbury's process is different enough that they maintain a separate template and pick and choose updates from the main one. I've toyed with a few potential solutions, but all of them so far come with significant drawbacks.

Rest assured, this _is_ something we're thinking about!

Rough idea is extracting the core configuration into an npm package, and allow users to override certain sections in the template. This is not easy though, due to how complex the config for this template has become.

Closing to consolidate future discussion into this new issue.

Sorry if this is a silly question, but what is the currently recommended path for upgrading? My plan was to just create an empty project and then manually diff the files with my current project.

That sounds like a workable plan. 馃憤 It's similar to what I do. I diff my non-source files with my initial commit, so I can see any customizations I've made to the build, then make those same modifications to a new project if necessary and then copy over my source files.

This will be resolved with vue-cli v3, please follow the kick-off discussion here: https://github.com/vuejs/vue-cli/issues/589

Was this page helpful?
0 / 5 - 0 ratings

Related issues

brucejcw picture brucejcw  路  4Comments

connor11528 picture connor11528  路  3Comments

hultberg picture hultberg  路  3Comments

rkrejcii picture rkrejcii  路  4Comments

dfdgsdfg picture dfdgsdfg  路  4Comments