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

Source map parsing fails when used in create-react-app typescript project #509

Closed
trombipeti opened this issue Feb 16, 2024 · 3 comments · Fixed by #514
Closed

Source map parsing fails when used in create-react-app typescript project #509

trombipeti opened this issue Feb 16, 2024 · 3 comments · Fixed by #514
Milestone

Comments

@trombipeti
Copy link

Describe the bug
When using dockview in a create-react-app project with typescript, running "npm start" produces loads of warnings about not being able to parse the source map for dockview.

To Reproduce

npx create-react-app dockview-source-map-repro --template typescript
cd ./dockview-source-map-repro
npm install dockview

Replace code in App.tsx with the code from here: https://codesandbox.io/p/sandbox/github/mathuo/dockview/tree/master/packages/docs/sandboxes/simple-dockview?file=%2Fsrc%2Fapp.tsx%3A1%2C1-97%2C1
npm start

Expected behavior
I don't get loads of warnings

Actual behavior
Warnings like this are produced for all files in the dockview and dockview-core node modules:

WARNING in ./node_modules/dockview-core/dist/esm/api/component.api.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from 'C:\Work\playground\dockview-source-map-repro\node_modules\dockview-core\src\api\component.api.ts' file: Error: ENOENT: no such file or directory, open 'C:\Work\playground\dockview-source-map-repro\node_modules\dockview-core\src\api\component.api.ts'
@mathuo mathuo linked a pull request Feb 18, 2024 that will close this issue
@mathuo mathuo reopened this Feb 19, 2024
@mathuo
Copy link
Owner

mathuo commented Feb 19, 2024

Thanks for raising this - yes the source maps are not configured correctly and do not work as expected, sorry about that.

I will remove them for now and re-visit adding source maps later on if there is demand since configuring them correctly would require a few changes.

@trombipeti
Copy link
Author

Thanks for the quick fix, I personally don't need the source maps so it's fine :)

@mathuo mathuo added this to the v1.10.0 milestone Feb 20, 2024
@mathuo
Copy link
Owner

mathuo commented Feb 25, 2024

Released in 1.10.0 https://dockview.dev/

@mathuo mathuo closed this as completed Feb 25, 2024
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

Successfully merging a pull request may close this issue.

2 participants