Endava / BEEQ

BEEQ Design System, a web component library ruled by Endavan developers :)
https://beeq.design
Apache License 2.0
78 stars 10 forks source link

Bug: vite fails to resolve correctly @beeq/core/dist/* paths #1069

Closed endv-bogdanb closed 4 months ago

endv-bogdanb commented 4 months ago

BEEQ package

beeq/react

BEEQ version

1.4.0

Current Behavior

✘ [ERROR] Missing "./dist/components/bq-accordion.js" specifier in "@beeq/core" package [plugin vite:dep-pre-bundle]

node_modules/@beeq/react/src/components.js:5:57:
  5 │ ...ineBqAccordion } from '@beeq/core/dist/components/bq-accordion.js';
    ╵                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This error came from the "onResolve" callback registered here:

node_modules/esbuild/lib/main.js:1293:20:
  1293 │       let promise = setup({

Expected Behavior

Should not fail.

Steps to Reproduce

  1. npm create vite@latest
  2. Pick react with typescript with swc
  3. cd project && npm i
  4. npm i @beeq/{core,react}
  5. add this to App.tsx
    
    import './App.css'
    import { BqButton } from '@beeq/react'

function App() { return }

export default App



### Code Reproduction URL

_No response_

### Your Environment

_No response_

### Additional Information

_No response_
dgonzalezr commented 4 months ago

Could this issue be related to the changes made in here #1059 ? 🤔

endv-bogdanb commented 4 months ago

Could this issue be related to the changes made in here #1059 ? 🤔

Yes, the issue is the "exports".

https://github.com/Endava/BEEQ/assets/109202804/464a458d-a854-4f8b-9075-16bdc8c3415c