huoxin In the 2.x docs for admin frontend

Shouldnt it be
export default [];
instead of return ?
Yes, you are absolutely correct, that's a mistake on our part right there! I've made the neccessary changes, which are currently in the process of deploying to the docs site.
huoxin Also, since adding settings and permissions is now done via admin/extend.js, does this mean that admin/index.js only needs:
export { default as extend } from './extend';
Is app.initializers.add still needed?
I noticed FoF extensions still include an empty initializer
Strictly speaking no, the initializer is not needed in your example. We elected to leave the initializer empty on the FoF extensions for two reasons:
- to enable extensions to still check
app.initializers.has('fof-some-extension') (for optional code, etc). fof-some-extension in flarum.extensions is also valid for this
- so that it's easy to add any other admin side customizations we might need going forward.