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

[Bug Report] broken in ESM project #12

Closed
josh-hemphill opened this issue Nov 23, 2021 · 0 comments
Closed

[Bug Report] broken in ESM project #12

josh-hemphill opened this issue Nov 23, 2021 · 0 comments

Comments

@josh-hemphill
Copy link

Steps to reproduce
In any project using the project in vite.config.js, set the projects type property to module

Expected Behavior
The default export should be the callable inspect() function. Or (like @intlify/vite-plugin-vue-i18n does it) have a named export import {inspect} from 'vite-plugin-inspect'

Actual Behavior
The default export is

({ default: [Getter] })

Doing an import * as reveals:

[Module: null prototype] {
  ArraySet: undefined,
  BASE_TRANSITION: undefined,
  BaseTransition: undefined,
  BasicSourceMapConsumer: undefined,
  CAMELIZE: undefined,
  CAPITALIZE: undefined,
  CREATE_BLOCK: undefined,
  CREATE_COMMENT: undefined,
  CREATE_ELEMENT_BLOCK: undefined,
  CREATE_ELEMENT_VNODE: undefined,
  CREATE_SLOTS: undefined,
  CREATE_STATIC: undefined,
  CREATE_TEXT: undefined,
  CREATE_VNODE: undefined,
  Comment: undefined,
  DOMDirectiveTransforms: undefined,
  DOMNodeTransforms: undefined,
  EMPTY_ARR: undefined,
  EMPTY_OBJ: undefined,
  EffectScope: undefined,
  FRAGMENT: undefined,
  Fragment: undefined,
  GREATEST_LOWER_BOUND: undefined,
  GUARD_REACTIVE_PROPS: undefined,
  HOOK_SETUP: undefined,
  IS_MEMO_SAME: undefined,
  IS_REF: undefined,
  ITERATE_KEY: undefined,
  IndexedSourceMapConsumer: undefined,
  KEEP_ALIVE: undefined,
  KeepAlive: undefined,
  LEAST_UPPER_BOUND: undefined,
  MERGE_PROPS: undefined,
  MappingList: undefined,
  NO: undefined,
  NOOP: undefined,
  NORMALIZE_CLASS: undefined,
  NORMALIZE_PROPS: undefined,
  NORMALIZE_STYLE: undefined,
  NavigationFailureType: undefined,
  OPEN_BLOCK: undefined,
  POP_SCOPE_ID: undefined,
  PUSH_SCOPE_ID: undefined,
  PatchFlagNames: undefined,
  RENDER_LIST: undefined,
  RENDER_SLOT: undefined,
  RESOLVE_COMPONENT: undefined,
  RESOLVE_DIRECTIVE: undefined,
  RESOLVE_DYNAMIC_COMPONENT: undefined,
  RESOLVE_FILTER: undefined,
  ReactiveEffect: undefined,
  RouterLink: undefined,
  RouterView: undefined,
  SET_BLOCK_TRACKING: undefined,
  START_LOCATION: undefined,
  SUSPENSE: undefined,
  SourceMapConsumer: undefined,
  SourceMapGenerator: undefined,
  SourceNode: undefined,
  Static: undefined,
  Suspense: undefined,
  TELEPORT: undefined,
  TO_DISPLAY_STRING: undefined,
  TO_HANDLERS: undefined,
  TO_HANDLER_KEY: undefined,
  TRANSITION: undefined,
  TRANSITION_GROUP: undefined,
  Teleport: undefined,
  Text: undefined,
  Transition: undefined,
  TransitionGroup: undefined,
  UNREF: undefined,
  V_MODEL_CHECKBOX: undefined,
  V_MODEL_DYNAMIC: undefined,
  V_MODEL_RADIO: undefined,
  V_MODEL_SELECT: undefined,
  V_MODEL_TEXT: undefined,
  V_ON_WITH_KEYS: undefined,
  V_ON_WITH_MODIFIERS: undefined,
  V_SHOW: undefined,
  VueElement: undefined,
  WITH_CTX: undefined,
  WITH_DIRECTIVES: undefined,
  WITH_MEMO: undefined,
  __esModule: true,
  advancePositionWithClone: undefined,
  advancePositionWithMutation: undefined,
  assert: undefined,
  babelParserDefaultPlugins: undefined,
  baseCompile: undefined,
  baseParse: undefined,
  buildProps: undefined,
  buildSlots: undefined,
  callWithAsyncErrorHandling: undefined,
  callWithErrorHandling: undefined,
  camelize: undefined,
  capitalize: undefined,
  checkCompatEnabled: undefined,
  cloneVNode: undefined,
  compareByGeneratedPositionsDeflated: undefined,
  compareByGeneratedPositionsInflated: undefined,
  compareByOriginalPositions: undefined,
  compatUtils: undefined,
  compile: undefined,
  computeSourceURL: undefined,
  computed: undefined,
  createApp: undefined,
  createArrayExpression: undefined,
  createAssignmentExpression: undefined,
  createBlock: undefined,
  createBlockStatement: undefined,
  createCacheExpression: undefined,
  createCallExpression: undefined,
  createCommentVNode: undefined,
  createCompilerError: undefined,
  createCompoundExpression: undefined,
  createConditionalExpression: undefined,
  createDOMCompilerError: undefined,
  createElementBlock: undefined,
  createElementVNode: undefined,
  createForLoopParams: undefined,
  createFunctionExpression: undefined,
  createHydrationRenderer: undefined,
  createIfStatement: undefined,
  createInterpolation: undefined,
  createMemoryHistory: undefined,
  createObjectExpression: undefined,
  createObjectProperty: undefined,
  createRenderer: undefined,
  createReturnStatement: undefined,
  createRoot: undefined,
  createRouter: undefined,
  createRouterMatcher: undefined,
  createSSRApp: undefined,
  createSequenceExpression: undefined,
  createSimpleExpression: undefined,
  createSlots: undefined,
  createStaticVNode: undefined,
  createStructuralDirectiveTransform: undefined,
  createTemplateLiteral: undefined,
  createTextVNode: undefined,
  createTransformContext: undefined,
  createVNode: undefined,
  createVNodeCall: undefined,
  createWebHashHistory: undefined,
  createWebHistory: undefined,
  customRef: undefined,
  decode: undefined,
  def: undefined,
  default: { default: [Getter] },
  deferredComputed: undefined,
  defineAsyncComponent: undefined,
  defineComponent: undefined,
  defineCustomElement: undefined,
  defineEmits: undefined,
  defineExpose: undefined,
  defineProps: undefined,
  defineSSRCustomElement: undefined,
  devtools: undefined,
  effect: undefined,
  effectScope: undefined,
  enableTracking: undefined,
  encode: undefined,
  escapeHtml: undefined,
  escapeHtmlComment: undefined,
  escapeLast: undefined,
  escapeRegex: undefined,
  extend: undefined,
  extractIdentifiers: undefined,
  findDir: undefined,
  findProp: undefined,
  fromSetString: undefined,
  generate: undefined,
  generateCodeFrame: undefined,
  getArg: undefined,
  getBaseTransformPreset: undefined,
  getCurrentInstance: undefined,
  getCurrentScope: undefined,
  getDevtoolsGlobalHook: undefined,
  getGlobalThis: undefined,
  getInnerRange: undefined,
  getMemoedVNodeCall: undefined,
  getTarget: undefined,
  getTransitionRawChildren: undefined,
  getVNodeBlockHelper: undefined,
  getVNodeHelper: undefined,
  guardReactiveProps: undefined,
  h: undefined,
  handleError: undefined,
  hasChanged: undefined,
  hasDynamicKeyVBind: undefined,
  hasOwn: undefined,
  hasRegexChars: undefined,
  hasScopeRef: undefined,
  helperNameMap: undefined,
  hydrate: undefined,
  hyphenate: undefined,
  includeBooleanAttr: undefined,
  initCustomFormatter: undefined,
  inject: undefined,
  injectProp: undefined,
  invokeArrayFns: undefined,
  isAbsolute: undefined,
  isArray: undefined,
  isBindKey: undefined,
  isBooleanAttr: undefined,
  isBuiltInType: undefined,
  isCoreComponent: undefined,
  isDate: undefined,
  isFunction: undefined,
  isFunctionType: undefined,
  isGloballyWhitelisted: undefined,
  isHTMLTag: undefined,
  isInDestructureAssignment: undefined,
  isIntegerKey: undefined,
  isKnownHtmlAttr: undefined,
  isKnownSvgAttr: undefined,
  isMap: undefined,
  isMemberExpression: undefined,
  isMemoSame: undefined,
  isModelListener: undefined,
  isNavigationFailure: undefined,
  isNoUnitNumericStyleProp: undefined,
  isObject: undefined,
  isOn: undefined,
  isPlainObject: undefined,
  isPromise: undefined,
  isProxy: undefined,
  isReactive: undefined,
  isReadonly: undefined,
  isRef: undefined,
  isReferencedIdentifier: undefined,
  isRegexChar: undefined,
  isReservedProp: undefined,
  isRuntimeOnly: undefined,
  isSSRSafeAttrName: undefined,
  isSVGTag: undefined,
  isSet: undefined,
  isSimpleIdentifier: undefined,
  isSlotOutlet: undefined,
  isSpecialBooleanAttr: undefined,
  isStaticExp: undefined,
  isStaticProperty: undefined,
  isStaticPropertyKey: undefined,
  isString: undefined,
  isSymbol: undefined,
  isTemplateNode: undefined,
  isText: undefined,
  isVNode: undefined,
  isVSlot: undefined,
  isVoidTag: undefined,
  isWindows: undefined,
  join: undefined,
  locStub: undefined,
  looseEqual: undefined,
  looseIndexOf: undefined,
  makeBlock: undefined,
  makeMap: undefined,
  markRaw: undefined,
  matchedRouteKey: undefined,
  mergeDefaults: undefined,
  mergeProps: undefined,
  nextTick: undefined,
  noopDirectiveTransform: undefined,
  normalize: undefined,
  normalizeClass: undefined,
  normalizeProps: undefined,
  normalizeStyle: undefined,
  objectToString: undefined,
  onActivated: undefined,
  onBeforeMount: undefined,
  onBeforeRouteLeave: undefined,
  onBeforeRouteUpdate: undefined,
  onBeforeUnmount: undefined,
  onBeforeUpdate: undefined,
  onDeactivated: undefined,
  onErrorCaptured: undefined,
  onMounted: undefined,
  onRenderTracked: undefined,
  onRenderTriggered: undefined,
  onScopeDispose: undefined,
  onServerPrefetch: undefined,
  onUnmounted: undefined,
  onUpdated: undefined,
  openBlock: undefined,
  parse: undefined,
  parseExpression: undefined,
  parseQuery: undefined,
  parseSourceMapInput: undefined,
  parseStringStyle: undefined,
  parserOptions: undefined,
  pauseTracking: undefined,
  popScopeId: undefined,
  processExpression: undefined,
  processFor: undefined,
  processIf: undefined,
  processSlotOutlet: undefined,
  propsToAttrMap: undefined,
  provide: undefined,
  proxyRefs: undefined,
  pushScopeId: undefined,
  queuePostFlushCb: undefined,
  quickSort: undefined,
  reactive: undefined,
  readonly: undefined,
  ref: undefined,
  registerRuntimeCompiler: undefined,
  registerRuntimeHelpers: undefined,
  relative: undefined,
  remove: undefined,
  removeBackslashes: undefined,
  removePrefix: undefined,
  render: undefined,
  renderList: undefined,
  renderSlot: undefined,
  resetTracking: undefined,
  resolveComponent: undefined,
  resolveComponentType: undefined,
  resolveDirective: undefined,
  resolveDynamicComponent: undefined,
  resolveFilter: undefined,
  resolveTransitionHooks: undefined,
  routeLocationKey: undefined,
  routerKey: undefined,
  routerViewLocationKey: undefined,
  search: undefined,
  setBlockTracking: undefined,
  setDevtoolsHook: undefined,
  setTransitionHooks: undefined,
  setupDevtoolsPlugin: undefined,
  shallowReactive: undefined,
  shallowReadonly: undefined,
  shallowRef: undefined,
  slotFlagsText: undefined,
  ssrContextKey: undefined,
  ssrUtils: undefined,
  stop: undefined,
  stringifyQuery: undefined,
  stringifyStyle: undefined,
  supportsLookbehinds: undefined,
  toDisplayString: undefined,
  toHandlerKey: undefined,
  toHandlers: undefined,
  toNumber: undefined,
  toPosixSlashes: undefined,
  toRaw: undefined,
  toRawType: undefined,
  toRef: undefined,
  toRefs: undefined,
  toSetString: undefined,
  toTypeString: undefined,
  toValidAssetId: undefined,
  tokTypes: undefined,
  track: undefined,
  trackSlotScopes: undefined,
  trackVForSlotScopes: undefined,
  transform: undefined,
  transformBind: undefined,
  transformElement: undefined,
  transformExpression: undefined,
  transformModel: undefined,
  transformOn: undefined,
  transformStyle: undefined,
  transformVNodeArgs: undefined,
  traverseNode: undefined,
  trigger: undefined,
  triggerRef: undefined,
  unref: undefined,
  urlGenerate: undefined,
  urlParse: undefined,
  useAttrs: undefined,
  useCssModule: undefined,
  useCssVars: undefined,
  useLink: undefined,
  useRoute: undefined,
  useRouter: undefined,
  useSSRContext: undefined,
  useSlots: undefined,
  useTransitionState: undefined,
  vModelCheckbox: undefined,
  vModelDynamic: undefined,
  vModelRadio: undefined,
  vModelSelect: undefined,
  vModelText: undefined,
  vShow: undefined,
  version: undefined,
  viewDepthKey: undefined,
  walkBlockDeclarations: undefined,
  walkFunctionParams: undefined,
  walkIdentifiers: undefined,
  warn: undefined,
  warnDeprecation: undefined,
  watch: undefined,
  watchEffect: undefined,
  watchPostEffect: undefined,
  watchSyncEffect: undefined,
  withAsyncContext: undefined,
  withCtx: undefined,
  withDefaults: undefined,
  withDirectives: undefined,
  withKeys: undefined,
  withMemo: undefined,
  withModifiers: undefined,
  withScopeId: undefined,
  wrapOutput: undefined
}
@antfu antfu closed this as completed in 7d3a4b6 Nov 23, 2021
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

1 participant