xyxiao001 / vue-cropper

A simple picture clipping plugin for vue
https://github.xyxiao.cn/vue-cropper/docs/vue3.html
MIT License
4.27k stars 695 forks source link

Nuxt开发环境启动正常,正式环境无法使用 #632

Open MygengBin opened 2 years ago

MygengBin commented 2 years ago

Nuxt init: npx nuxt-create-app .

npm run dev

dev

npm run build & npm run start

production

xyxiao001 commented 2 years ago

看看文档 nuxt 需要单独配置的

xyxiao001 commented 2 years ago

if(process.browser) { vueCropper = require('vue-cropper') Vue.use(vueCropper.default) }

MygengBin commented 2 years ago

if(process.browser) { vueCropper = require('vue-cropper') Vue.use(vueCropper.default) }

我按照文档配置是这样的

/plugins/cropper.js配置

cropper

nuxt.config.js配置

nuxt

运行结果

error

lctech-bill commented 9 months ago

文檔裡 nuxt 的配置... 是 nuxt2 / nuxt3 ?

看起來不太像是 nuxt3 的配置