Skip to content

Separate Public and Admin functions into separate apps #16

@AndrewHeathVF

Description

@AndrewHeathVF

(Note: @XertroV wrote the body)

there are some options for how to handle building a second UI output, we should think carefully in-case we want to add more UI outputs in future (e.g. to include accessibility features).

general patterns I can think of:

  1. create new packages using vue-cli and add the ui package as a dependency; each of these new packages is a simple shim and all UI components are still kept in ui package
    • outputs to a directory specific to the package (e.g. ./packages/ui-admin/dist)
  2. add a new output to ui package via webpack config options
    • outputs to new subdirectory (similar to what we do now where the app is published to ./dist/v/); example ./dist/admin

Personally I feel like option 2 is best here, which is what I've based the checklist below on

  • figure out if option 2 is compatible with vue-cli / serve / build / etc (we need to make sure we can run each entrypoint individually on designated ports)
  • create second entrypoint files, modeled on ./src/main.ts and ./src/App.vue; maybe ./src/entries/admin.ts and ./src/entries/AdminApp.vue (which would give us a nice pattern for future)
  • add second entrypoint to vue.config.js in webpackConfig which builds admin UI and outputs to ./dist/admin (like current UI outputs to ./dist/v)
  • extend ./manage so we can choose individual UIs to build (optional: if it builds all of them that's fine too)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions