nuxt3 import
Ischafak opened this issue · 1 comments
Ischafak commented
[nuxt] [request error] [unhandled] [500] Named export 'mask' not found. The requested module '/node_modules/vue-the-mask/dist/vue-the-mask.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'node_modules/vue-the-mask/dist/vue-the-mask.js';
const { mask } = pkg;
when i try to build i get this error
import vmask from 'vue-the-mask';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.directive(
"mask", vmask.mask
)
})
this is my mask.js plugin file