cra-alias
cra-alias copied to clipboard
Does not work on Linux or Mac
Hi, this is my configuraion:
{ "compilerOptions": { "baseUrl": "src", "paths": { "@core-components/*": ["./core/src/components/*"], "@core-utils/*": ["./core/src/utils/*"], "@core-layouts/*": ["./core/src/layouts/*"], "@core-static/*": ["./core/src/static/*"], "@core-fonts/*": ["./core/src/static/assets/fonts/*"], "@core-styles/*": ["core/src/styles/*"], "@core-src/*": ["./core/src/*"] } }, "include": ["src"] }
While this work perfectly fine on Windows importing scss. The same does not work on Linux and Mac.
Import line on src/styles/main.scss:
@import '~@core-styles/main';
Error:
@import '~@core-styles/main'; ^ File to import not found or unreadable: ~@core-styles/main. in /mnt/d/project-folder/src/styles/main.scss (line 2, column 1)
Again the solution works perfectly on windows.