The frontend of the module provides various types of objects to the system through the entry file, and the system will automatically load these objects

Specification of Entry File

EggBornJS adopts the specification of Vue Plugin to implement the entry file of the frontend of the module

Entry File


let Vue;

import './assets/css/module.css';

// install
function install(_Vue, cb) {
  if (Vue) return console.error('already installed.');

  Vue = _Vue;

  return cb({
    routes: require('./routes.js').default,
    store: require('./store.js').default(Vue),
    config: require('./config/config.js').default,
    locales: require('./config/locales.js').default,
    components: require('./components.js').default,

// export
export default {
Name Description
routes Page Component Route List
store Module State Management
config Configuration
locales I18n Resources
components Component List