import path from 'path'; import unpluginVueComponents from 'unplugin-vue-components/webpack'; export default function (c, i) { this.nuxt.hook('build:before', (nuxt, buildOptions) => { buildOptions.plugins.push( unpluginVueComponents({ resolvers: [ { type: 'component', resolve(componentName) { if (componentName.startsWith('Validation')) { // console.log( // '🚀 ~ file: nuxt.config.js ~ line 230 ~ resolve ~ componentName', // componentName, // ); return { name: componentName, from: 'vee-validate', // sideEffects: getSideEffects(importName, options), }; } }, }, ], }), ); }); this.addPlugin(path.resolve(__dirname, 'plugin.js')); }