Skip to content

Make "vue create" support a Non-SPA project mode #7347

Open
@basilmusa

Description

@basilmusa

What problem does this feature solve?

There is a growing need to be able to embed and reuse Vue Components in non-spa applications. Meaning, applications that use serve-side template rendering (like JSP, PHP, Thymeleaf, etc).

In essence, use Vue Components directly in server-side rendered pages without using SPA underground plumbing of Vue router, VueX, etc. Just Vue components that can be reused.

The advantage is the ability to embed Vue in existing applications that have already been built using server-side page rendering technologies.

Currently, Vue supports two modes:

(Mode 1) Include vue.js directly via a CDN

(Mode 2) Create a Vue SPA application via "vue create"

This feature request is to support a third mode which is "(Mode 3) Create a Vue Component-Based Only application" which is similar to (Mode 2) above but will allow to build components separately in /dist folder to be included in the server side pages.

Currently, this is possible as described in the web links below, but we need to allow this "out-of-the-box" by enabling it as an option through "vue create" to set this up automatically without having to modify manually package.json files and other configurations.

Example popular setup tutorials that managed to have this setup, (notice it is not straight-forward to setup and hence I'm creating this feature request ticket):

(1) Reusable Vue components in server side pages: https://reflectoring.io/reusable-vue-components-in-thymeleaf/

(2) Using Vue in Non-SPA Applications: https://jerickson.net/using-vue-in-non-spa/

What does the proposed API look like?

vue create "my-non-spa-component-based-project"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions