All Projects → mavajee → guide__vue-cli-3-multiple-entry-points

mavajee / guide__vue-cli-3-multiple-entry-points

Licence: MIT license
Simple guide to show how to create multiple entry points (pages) using vue-cli-3

Programming Languages

Vue
7211 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to guide vue-cli-3-multiple-entry-points

Escape From Callback Mountain
Example Project & Guide for mastering Promises in Node/JavaScript. Feat. proposed 'Functional River' pattern
Stars: ✭ 249 (+758.62%)
Mutual labels:  guide, example
React Redux Typescript Realworld App
RealWorld App implementation based on "react-redux-typescript-guide"
Stars: ✭ 178 (+513.79%)
Mutual labels:  guide, example
Express Env Example
A sample express environment that is well architected for scale. Read about it here:
Stars: ✭ 130 (+348.28%)
Mutual labels:  guide, example
dvc dask use case
A use case of a reproducible machine learning pipeline using Dask, DVC, and MLflow.
Stars: ✭ 22 (-24.14%)
Mutual labels:  guide, example
bKash-payment-gateway-web-demo
bKash payment gateway API integration documentation for web.
Stars: ✭ 74 (+155.17%)
Mutual labels:  example
scala-basic-skeleton
Starting point if you want to bootstrap a project in Scala
Stars: ✭ 16 (-44.83%)
Mutual labels:  example
factorio-example-mod
Lightweight modular example mod with various features and compatibilities
Stars: ✭ 15 (-48.28%)
Mutual labels:  example
yii2-manual-chm
Yii 2 Guide/API/Docs compiled in various formats
Stars: ✭ 63 (+117.24%)
Mutual labels:  guide
vue3-webpack-boilerplate
Vue 3 Webpack Boilerplate (Vue 3, Vue Router 4, Vuex 4, Typescript)
Stars: ✭ 69 (+137.93%)
Mutual labels:  vue-router
Discord.Net-Example
Discord.Net Example bots
Stars: ✭ 104 (+258.62%)
Mutual labels:  example
Interview-Study-Guide
readme files for basic CS problems
Stars: ✭ 26 (-10.34%)
Mutual labels:  guide
HTML-Crypto-Currency-Chart-Snippets
💹 Simple HTML Snippets to create Tickers / Charts of Cryptocurrencies with the TradingView API 💹
Stars: ✭ 89 (+206.9%)
Mutual labels:  example
NodeExpressCRUD
Node, Express, Mongoose and MongoDB CRUD Web Application
Stars: ✭ 45 (+55.17%)
Mutual labels:  example
line-fido2-server
FIDO2(WebAuthn) server officially certified by FIDO Alliance and Relying Party examples.
Stars: ✭ 350 (+1106.9%)
Mutual labels:  example
ifconfig.top
Source code of ifconfig.top website
Stars: ✭ 19 (-34.48%)
Mutual labels:  example
aura-admin
Aura Admin is the Web App that helps you to mange the Tech Communities like GDGs, DSCs or any other tech communities with Aura
Stars: ✭ 58 (+100%)
Mutual labels:  vue-router
vue-bootstrap-boilerplate
📦 Vue 2/3, Bootstrap 5, Vuex, Vue-Router, Sass/Scss, ESLint, Axios (switch to vue3 branch)
Stars: ✭ 86 (+196.55%)
Mutual labels:  vue-router
capacitor-vue-ionicv4-app
sample app using capacitor vuejs and ionicv4 components
Stars: ✭ 70 (+141.38%)
Mutual labels:  vue-router
workshop-todo-dapp
A workshop into adding realtime collaboration in a typical To-do app
Stars: ✭ 29 (+0%)
Mutual labels:  example
vue-iview-admin-template
Vue 2.0 admin template based on View UI
Stars: ✭ 43 (+48.28%)
Mutual labels:  vue-router

Vue-cli 3 and multiple entry points (pages)

UPD.1: I found reference for multiple pages in the vue-cli source code. I think it's not yet documented.

UPD.2: See config documentation for create multiple pages.


For example we need build three different app instances:

  • index - /;
  • manage - /manage;
  • dashboard - /manage.

Simple way add pages config reference to vue.config.js.

Full config you can see here.

Old example using webpack-chain is here.

Configure vue.config.js

With pages api you don't need manually edit entry points. You just define each your page like this:

module.exports = {
  pages: {
    manage: {
      entry: 'src/manage/main.js',
      template: 'public/index.html',
      filename: 'manage/index.html',
      title: 'Manage Page',
      chunks: ['chunk-vendors', 'chunk-common', 'manage']
    }
}

Vue router

Using vue router you will see error, for fix configure historyApiFallback for webpack-dev-server:

devServer: {
    historyApiFallback: {
        rewrites: [
            { from: /^\/manage\/?.*/, to: path.posix.join('/', 'manage/index.html') },
            { from: /./, to: path.posix.join('/', 'index.html') }
        ]
    },
}

Configure Nginx

For more, if you need configure nginx you can make something like this:

server {
    listen 80;

    location ~ ^/manage(.*)$ {
        proxy_pass http://127.0.0.1:8550/manage/$1;
    }
}

Best way if on a each entry point configure own location. See full config here.

Using non "localhost" host HMR can not be working. And for it add allowedHosts to webpack-dev-server or edit server headers.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].