cyntler / react-doc-viewer

File viewer for React.
https://cyntler.github.io/react-doc-viewer
Apache License 2.0
373 stars 125 forks source link

What is __vite-browser-external-DYxpcVy9.js from dist folder #279

Open xneek-shtorm opened 2 months ago

xneek-shtorm commented 2 months ago

What is vite-browser-external-DYxpcVy9.js from dist folder? The build of my webpack project fails because... the file vite-browser-external-DYxpcVy9.js is not under the feet of my project. And it lies under the feet of the library.

Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it.
ERROR in@product.front/ui-kit/dist/product-ui-kit.js 153:86573-86620
Module not found: Error: Can't resolve './__vite-browser-external-DYxpcVy9.js' in /@product.front/ui-kit/dist'
resolve './__vite-browser-external-DYxpcVy9.js' in '/node_modules/@product.front/ui-kit/dist'
  using description file: /node_modules/@product.front/ui-kit/package.json (relative path: ./dist)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: /node_modules/@product.front/ui-kit/package.json (relative path: ./dist/__vite-browser-external-DYxpcVy9.js)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
       /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js.tsx doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js.ts doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
       /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js.js doesn't exist
      .scss
        Field 'browser' doesn't contain a valid alias configuration
       /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js.scss doesn't exist
      as directory
        /@product.front/ui-kit/dist/__vite-browser-external-DYxpcVy9.js doesn't exist
 @ ./src/components/App/Application.tsx 3:0-99 23:22-32 23:34-44 23:46-57 23:[59](https://wh-
cyntler commented 2 months ago

@xneek-shtorm What about v1.16.6?

xneek-shtorm commented 2 months ago

@xneek-shtorm What about v1.16.6? There are even more errors 🫤 image

Using a pure example, create-react-app is builds without errors, but errors will occur in runtime, because There are still these imports from under your feet, but there are no files under your feet...

image