npm run build:components
to build the component system UMD+CSS filesnpm run build:client
to build the base app that contains it's own state/etcnpm run start:server
to start the static server that costs the CDN content and app in seperate routes
Then, go to localhost:3000
in order to see the app render
both the local components, and the CDN UMD components rendered and sharing state as if it were all in one app
- There are two main apps, two main libraries:
The server does nothing other than act as a CDN for the client and the server
The base library contains the following:
- Symbols used by Vue to provide/inject data from
Client
toComponents
- Compositions to abstract away usage of the Symbols for easier consumption
It is treated as a singleton, where it is injected into window
from the client and imports
to the Base
lib are mutated by the Webpack build of the Components
vue
is made into a window
singleton in the same way (injected into the window by the client, libs' build's redirect import
s to window['VUE']
)
You build the base
library into a UMD.js
file using Webpack to mutate imports by the build:components
command
Finally, once these components are hosted by the server CDN, you import them into the window by dynamically creating script
tags
These components are added as global Vue tags and is rendered by using the dynamic component :is
loader