You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Error when adding tsConfig key to resolve in Rspack configuration
Description
I am building an application using the Rspack library. During the setup, I attempted to add path aliases to the tsconfig.json file. According to the [Rspack documentation], this requires adding a tsConfig key under the resolve node in the rspack.config.ts file.
However, after adding the tsConfig key, the application fails to run, throwing the following error:
Cannot read properties of undefined (reading 'resolve')
Steps to Reproduce
Clone the project (link below)
yarn install
yarn dev
Attempt to run the project.
Expected Behavior
The project should compile and run successfully with the configured path aliases.
Actual Behavior
The application fails to run and throws the error:
Cannot read properties of undefined (reading 'resolve')
Relevant Code
Here is the rspack.config.ts snippet:
import{defineConfig}from'rspack';importpathfrom'path';exportdefaultdefineConfig({resolve: {tsConfig: path.resolve(__dirname,'./tsconfig.json'),},// other configuration options});
System Info
Issue: Error when adding
tsConfig
key toresolve
in Rspack configurationDescription
I am building an application using the Rspack library. During the setup, I attempted to add path aliases to the
tsconfig.json
file. According to the [Rspack documentation], this requires adding atsConfig
key under theresolve
node in therspack.config.ts
file.However, after adding the
tsConfig
key, the application fails to run, throwing the following error:Steps to Reproduce
Expected Behavior
The project should compile and run successfully with the configured path aliases.
Actual Behavior
The application fails to run and throws the error:
Relevant Code
Here is the
rspack.config.ts
snippet:And the
tsconfig.json
file:Additional Information
Project Link
You can find the project repository here: PROJECT_LINK
Notes
If there are any additional configurations or steps required to make this work, please let me know. Thank you for your assistance!
Details
The application fails to run and throws the error:
Reproduce link
No response
Reproduce Steps
Steps to Reproduce
The text was updated successfully, but these errors were encountered: