Agontuk / vue-cropperjs

A Vue wrapper component for cropperjs https://github.com/fengyuanchen/cropperjs
MIT License
937 stars 224 forks source link

vite build error : 'default' is not exported by node_modules/vue/dist/vue.runtime.esm-bundler.js, imported by node_modules #96

Open greper opened 3 years ago

greper commented 3 years ago

My lib project use vue3 and vite build (target lib ) result:

import r, {.   //  <--------  This r shouldn't be here
  ref as s,
  computed as h,
  resolveComponent as c,
  openBlock as l,
  createBlock as p,
  resolveDynamicComponent as d,
  mergeProps as u,
  withCtx as m,
  createVNode as g,
  withDirectives as f,
  vShow as v,
  toDisplayString as w,
  Fragment as b,
  renderList as y
} from "vue";

A parent project use this lib ,and when i run vite build get error :

'default' is not exported by node_modules/vue/dist/vue.runtime.esm-bundler.js, imported by node_modules/@fast-crud/extends-uploader/dist/components/fs-cropper.js

The error may come from here


'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _vue = require('vue');    // <------------ here

var _cropperjs = require('cropperjs');
Agontuk commented 3 years ago

Not sure it's the library issue. Example project works & builds fine with vite. Can you check if it's coming from your lib ?

amit-chaudhary4 commented 2 years ago

I am having same issue, let me know if there is any workaround.

VoOneCode commented 3 months ago

Hello! Is any fix there?