Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Apr 18, 2021 · 3 comments

Comments

@greper
Copy link

greper commented Apr 18, 2021

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
Copy link
Owner

Agontuk commented Apr 23, 2021

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
Copy link

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

@VoOneCode
Copy link

Hello! Is any fix there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants