Put in order · Vue.js course · Module 14: Directives & Plugins
Auto-install pattern
Arrange the steps of the plugin auto-install pattern:
Items to put in order
- Export the plugin: export default MyPlugin
- Call window.Vue.use(MyPlugin)
- Check: typeof window !== 'undefined' && window.Vue
- Define the plugin with an install() method
You can check the correct answer by solving this task in the CodeWorlds game.