vue-cropperjs icon indicating copy to clipboard operation
vue-cropperjs copied to clipboard

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

Open greper opened this issue 3 years ago • 3 comments

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');

greper avatar Apr 18 '21 11:04 greper

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

Agontuk avatar Apr 23 '21 11:04 Agontuk

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

amit-chaudhary4 avatar Nov 07 '22 12:11 amit-chaudhary4