Skip to content
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

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

Open
basilmusa opened this issue Jan 8, 2023 · 0 comments
Open

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

basilmusa opened this issue Jan 8, 2023 · 0 comments

Comments

@basilmusa
Copy link

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"

@basilmusa basilmusa changed the title "vue create" to support Vue components for non-spa projects Make "vue create" support a Non-SPA project mode Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant