-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Possible issue with webpack path resolver after migrating to v.5.0.0 #11838
Possible issue with webpack path resolver after migrating to v.5.0.0 #11838
Comments
Any updates on this? |
I'm seeing this same issue with not being able to find scss stylsheets after upgrade Also have tried
|
I was having this same issue and solved it by:
After making these changes I was back in business with CRA v5 (upgrading from v4). |
Experiencing this issue as well. Changing imports from |
I was able to also fix my issue by using full paths as described ^ |
Hello cra team,
We have mono repository with 4 project and components library. We use yarn worspace to symlink components dependecy to project.
Components library is built with rollup. TS and CSS are compiled into bundles. Also we are copiing scss variables to dist for reusing it in projects.
We import styles and scss variables to projects from node_modules using alias like this
import "~components/dist/style.css"
import "~components/scss/variable"
Everything works fine on 4.0.3, but after migarting to 5.0.0 looks like something wrong with path resolver in webpack.
We also have tried without ~, as it is deprecated in sass, but result is still the same.
Also we are not able to load some JSON files in typescript module from "components/dist/some.json"
We are using react-scripts with typescript, seems like exports property in package.json is still experimental for typescript.
We have already tried all of the simple solutions like re-install of the node_modules.
Could you please assist?
![147358341-27922286-a338-4126-a8b0-e6b111232844](https://user-images.githubusercontent.com/16716828/147559082-dae4a275-6908-4802-b17e-76bf3a82585f.png)
![absolute_common_lib_path-not-working2](https://user-images.githubusercontent.com/16716828/147358343-22055db2-198e-4b53-9369-d60b0ee7ee10.png)
![css-loader-error-with-sass-loader](https://user-images.githubusercontent.com/16716828/147358345-676759f6-ebd1-4377-8432-1bbe2fd29713.png)
![path-resolver-with-relative-path-works](https://user-images.githubusercontent.com/16716828/147358347-9f59e20a-87c6-41e8-943b-0f12da259f5e.jpg)
The text was updated successfully, but these errors were encountered: