Nuxt Modern Cropper
Power-packed wrapper over cropperjs@next.
This package is just a module wrapper over vue-modern-cropper, for more information check it's repo.
Table of Contents
TOC
Usage
Install & Setup
pnpm add -D nuxt-modern-cropper vue-modern-cropper
Add nuxt-modern-cropper
to your Nuxt config file:
export default defineNuxtConfig({
modules: [
'nuxt-modern-cropper',
],
})
That's it! You can now use <ModernCropper />
in your Nuxt app ✨
To infer the type of the component for ref
creation, make sure to use import type
to avoid build error, because the module is client-only.
import type { ModernCropper } from '#components'
const cropperRef = ref<InstanceType<typeof ModernCropper>>()
Contribution
Local development
npm install
npm run dev:prepare
npm run dev
npm run dev:build
npm run lint
npm run test
npm run test:watch
npm run release