Rollup bundling process does not handle "~" alias
See original GitHub issueDescribe the bug
It looks like Rollup is not handling the ~
substitution with src
folder path. This is ok when you inspect the dist
folder generated inside the repo…but it fails to build inside a project which uses react-dnd-treeview
as dependency.
I hope you can fix this…the library does a great job! 😃
To Reproduce Steps to reproduce the behavior:
- Add
react-dnd-treeview
as dependency in a TS project - Navigate to the package folder inside
node_modules
- Open any file that imports
~/types
- i.e./dist/hooks/useContainerClassName.d.ts(
- See screenshots
Expected behavior
Transpiled files should contain ../src/
instead of ~
Screenshots
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Aliases not working while importing node modules #27 - GitHub
I am using preact-compat as an alias for react within my rollup config file. My plugin config is as below :- plugins: [...
Read more >roll up bundle fails to map alias import - Stack Overflow
But i am having issue with import mapping in the bundle I build, since I am using Path aliases in my source code....
Read more >rollup.js
Especially if you are bundling Rollup into another build tool or want to integrate it into an advanced build process, it may be...
Read more >Rollup-plugin-alias - npm.io
Define aliases when bundling packages with Rollup. Let's take a simple import as an example: import something from '../../../something'; something();
Read more >rollup-plugin-alias-fork - npm package - Snyk
Define aliases when bundling packages with Rollup. This is fork, which is done for the sake of working with all files, without adding...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks @minop1205, just installed the
alpha
version and the project compiles!Thank you for such a quick response.
Hello @minop1205, thanks for such a quick reply.
To reproduce the error:
react-dnd-treeview
as a dependency and re-create the demo you listed on this repo.tsconfig.json
setskipLibCheck: false
(or just delete the line)tsc
command.You should see the errors. Let me know if you need any other help.