Nuxt was created before Vue CLI 3 and Nuxt generator does not have the flexibility and plug-in model of the CLI3 that lets add/remove/modify features in your existing project, for example, add TypeScript or a CSS library in the project as an after-though. It also provides a nice UI for modifying the plugins in your web browser. I believe Nuxt should take advantage of this architecture without reinventing the wheel. The fact that I cannot use CLI3 features in a nuxt application discourages me from using nuxt, instead if nuxt was provided as a CLI3 plugin to add nuxt structure and features on top of a vue project (maybe as a sub-structure or module if that makes it easier) then I could easily choose to use Nuxt, because I know I will have control over it through CLI3 plugin system to upgrade or even remove it if I want to. In fact I believe this should be the primary way supported to install Nuxt.
There looks to be an attempt on doing this with vue-cli-plugin-nuxt-starter-template by @andoshin11 but it doesn't seem to be actively maintained.
You run a Vue CLI 3 command like vue add nuxt
and it will add nuxt structure and build to your existing VueJS project.
My POV: I don't think that this will happen.
However I think that @Atinux can give a more detailed statement on that topic.
Hi @omidkrad
I will comment your sentences to give you some context :)
Nuxt was created before Vue CLI 3 and Nuxt generator does not have the flexibility and plug-in model of the CLI3 that lets add/remove/modify features in your existing project, for example, add TypeScript or a CSS library in the project as an after-though.
Indeed, Nuxt was created before Vue CLI 3, but you are wrong when you talk about flexibility and plug-in model for Nuxt.js. We have a strong module system which let you add/upgrade/remove any module at any time of your project lifecycle without changing any of your project files.
Example:
It also provides a nice UI for modifying the plugins in your web browser. I believe Nuxt should take advantage of this architecture without reinventing the wheel.
Agree, but let me question why Vue-CLI 3 reinvented the wheel when we had a bullet proof module ecosystem 馃槃
The fact that I cannot use CLI3 features in a nuxt application discourages me from using nuxt, instead if nuxt was provided as a CLI3 plugin to add nuxt structure and features on top of a vue project (maybe as a sub-structure or module if that makes it easier) then I could easily choose to use Nuxt, because I know I will have control over it through CLI3 plugin system to upgrade or even remove it if I want to. In fact I believe this should be the primary way supported to install Nuxt.
Sorry to read that, but actually, vue-cli plugins updates your code application so upgrades are quite difficult and are not possible today, it's planned with V4 with codemods (see https://github.com/vuejs/vue-cli/issues/3649) but will add some work to plugin maintainers.
With Nuxt modules:
yarn add my-nuxt-module
+ add it in the modules
property of your nuxt.config.js
yarn remove my-nuxt-module
+ remove it in the modules
property of your nuxt.config.js
Anyway, Guillaume is working on a new UI project to handle both Vue CLI & Nuxt projects so this one may be the solution you are looking for :)
Hi @Atinux, thanks for your detailed answer. Yes, not having to modify any of the project files when adding/removing modules is what I look for in a modular system, so I think I will give it a shot! Thanks again! 馃檪
@Atinux Hey S茅bastian, any updates on nuxt for vue cli?
@simplenotezy it actually won't change, but I know Guillaume Chau may announce a GUI for both Vue CLI and Nuxt soon :)
This feature-request has been cancelled by @Atinux.
Not in future plans
Most helpful comment
Hi @omidkrad
I will comment your sentences to give you some context :)
Indeed, Nuxt was created before Vue CLI 3, but you are wrong when you talk about flexibility and plug-in model for Nuxt.js. We have a strong module system which let you add/upgrade/remove any module at any time of your project lifecycle without changing any of your project files.
Example:
Agree, but let me question why Vue-CLI 3 reinvented the wheel when we had a bullet proof module ecosystem 馃槃
Sorry to read that, but actually, vue-cli plugins updates your code application so upgrades are quite difficult and are not possible today, it's planned with V4 with codemods (see https://github.com/vuejs/vue-cli/issues/3649) but will add some work to plugin maintainers.
With Nuxt modules:
yarn add my-nuxt-module
+ add it in themodules
property of yournuxt.config.js
yarn remove my-nuxt-module
+ remove it in themodules
property of yournuxt.config.js
Anyway, Guillaume is working on a new UI project to handle both Vue CLI & Nuxt projects so this one may be the solution you are looking for :)