Skip to content
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.
This repository has been archived by the owner on Jan 24, 2025. It is now read-only.

Broken Build if I use "import * as xxxx" #1287

Closed
@joaovbrandon

Description

Bug Report

Hello! Can someone help me, please? 😄 I can't get why this is happening...

I'm getting this warns in the terminal after run docz dev or docz build:

warn "export 'hasOwnProperty' (imported as 'XXXX') was not found in './xxxx'
warn "export 'hasOwnProperty' (imported as 'YYYY') was not found in './yyyy'

Everything works fine in development, but after build, in prod the links in sidebar with submenus don't work and the components don't render correctly in some cases... The console prints an error.

I notice that this occurs when I have some component in the Docz with imports like import * as XXXX (in the component or in an imported file).

To Reproduce

I reproduce a very basic example of this issue in this repository that I create from docz basic example.

Just run yarn to install dependencies, yarn dev to run dev and yarn build then yarn serve to run prod.

Expected behavior

I don't know why this warn is happening, but the build should work (like in development)!

Environment

- docz version: 2.1.1
- OS: macOS Catalina 10.15.1
- Node/npm version: Node 10.16.0/npm 6.11.3

Additional context/Screenshots

  • Console after run yarn dev
    console-after-run-yarn-dev

  • Browser console in dev
    browser-console-in-dev

  • Console after run yarn build
    console-after-run-yarn-build

  • Browser console in prod (yarn serve)
    browser-console-in-prod

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions