-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
.swcrc
loaded via --config-file
does not resolve jsc.baseUrl
#7800
Comments
Can confirm this seems to affect @swc/core v1.3.76 and reverting to v1.3.75 removes the issue. In my project I had not defined UPDATE: I added My {
"$schema": "http://json.schemastore.org/swcrc",
"module": {
"type": "commonjs"
},
"jsc": {
"baseUrl": ".",
"parser": {
"syntax": "typescript",
},
"paths": {
"@/*": [
"./src/*"
]
}
},
"exclude": [
"./**/__tests__/*"
]
} My // @ts-check
/**
* @type {import('@swc/core/types').Options}
*/
const swcConfig = {
module: {
type: 'commonjs',
},
jsc: {
baseUrl: '.',
parser: {
syntax: 'typescript',
},
paths: {
'@/*': ['./src/*'],
},
},
envName: 'test',
swcrc: false,
}
/**
* @type {import('jest').Config}
*/
const jestConfig = {
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
// @ts-expect-error swc options are not assignable
swcConfig,
],
},
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
},
coveragePathIgnorePatterns: ['<rootDir>/jest'],
}
// eslint-disable-next-line no-undef
module.exports = jestConfig If you need more context, the project I'm trying to upgrade is https://github.com/sambauers/tailwindcss-3d |
@kushuh If it still occurs, please provide a minimal reproduction . |
swc-project/jest@b17afb5 is about |
Can confirm this works now for Jest provided I specify a |
@kdy1 I was able to confirm the issue is not present on |
I was also able to reproduce the issue without using jest 🤔 |
Ah, |
jsc.baseUrl
anymore in .swcrc configjsc.baseUrl
Oh the problem was |
jsc.baseUrl
.swcrc
loaded via --config-file
does not resolve jsc.baseUrl
Postponing to working hours as it's about |
…le` (swc-project#7801) **Related issue:** - Closes swc-project#7800
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
I recently upgraded from
"@swc/core": "^1.3.70"
to"@swc/core": "^1.3.76"
, and my configuration does not compile anymore.Input code
Running the compile command:
Config
In my
.build.swcrc
file.Playground link
No response
Expected behavior
I expect a compilation success (worked well up until at least
"@swc/core": "^1.3.70"
)Actual behavior
I get this error during compilation:
Version
"@swc/cli": "^0.1.62"
"@swc/core": "^1.3.76"
Additional context
No response
The text was updated successfully, but these errors were encountered: