risen228 / cra-alias Goto Github PK
View Code? Open in Web Editor NEWNo longer maintained, please use https://github.com/risenforces/craco-alias
License: MIT License
No longer maintained, please use https://github.com/risenforces/craco-alias
License: MIT License
Hey
I use code coverage, however i have found when applying ignore paths to my jest configuration, they are no longer respected.
package.json
...
"jest": {
"collectCoverageFrom": [
"src/**/**/**/*.js",
"src/**/**/**/*.jsx",
"!src/index.js",
"!src/setupTests.js",
"!src/**/stories/*.js"
]
},
...
please can you take a look at this?
Hey Guys
There seems to be an issue where the moduleNameMapper
path is replicated
Please check your configuration for these entries:
{
"moduleNameMapper": {
"/^@components(.*)$/": "/Users/xxx/Documents/Projects/react/xxx/xxx-ui/src/Users/xxx/Documents/Projects/react/xxx/xxx-ui/src/components$1"
},
"resolver": /Users/xxx/Documents/Projects/react/xxx/xxx-ui/node_modules/react-scripts/node_modules/jest-pnp-resolver/index.js
}
this is preventing me from running any of my unit tests
jsconfig.json
{
"compilerOptions": {
"baseUrl": "src",
"paths": {
"@features": [
"./features"
],
"@components": [
"components"
],
"@constants": [
"./constants"
],
"@context": [
"./context"
],
"@reducers": [
"./reducers"
],
"@services": [
"./services"
],
"@hooks": [
"./hooks"
]
}
}
}
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.
When using this on windows, the baseUrl value is always invalid.
This happens cause of the path separator used on path.normalize
To avoid it, specify a format on the path.normalize
call and on the valid paths
I can do a PR with this later
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.