We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
System: OS: Windows 11 10.0.22631 CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz Memory: 8.82 GB / 31.71 GB Browsers: Edge: Chromium (121.0.2277.98) Internet Explorer: 11.0.22621.1 npmPackages: @rsbuild/core: 0.3.11 => 0.3.11 @rsbuild/plugin-react: 0.3.11 => 0.3.11 @rsbuild/plugin-type-check: 0.3.11 => 0.3.11
I want to transform import { CssBaseline } from '@mui/material'; to import CssBaseline from '@mui/material/CssBaseline ';
import { CssBaseline } from '@mui/material';
import CssBaseline from '@mui/material/CssBaseline ';
My config is
{ libraryName: '@mui/material', }
And the output is
import Typography from "@mui/material/lib/typography";
If I disable libraryDirectory the result is the same if I set libraryDirectory to '' the result is import Typography from "@mui/material//typography";
libraryDirectory
''
import Typography from "@mui/material//typography";
And if I try the customName customName: (member: string) => '@mui/material/${member}' the result is the same.
customName: (member: string) => '@mui/material/${member}'
How can I transform it? I think that there is a bug.
isnt necessary
build or dev
The text was updated successfully, but these errors were encountered:
instead of function, please use string template like customName: '@mui/materials/{{ member }}'
customName: '@mui/materials/{{ member }}'
ref: https://rsbuild.dev/config/source/transform-import#customname
btw, import Typography from "@mui/material//typography" would work i think
import Typography from "@mui/material//typography"
Sorry, something went wrong.
This works, but the other no. This maybe confusing.
This is not a valid import path:
No branches or pull requests
Version
Details
I want to transform
import { CssBaseline } from '@mui/material';
toimport CssBaseline from '@mui/material/CssBaseline ';
My config is
And the output is
If I disable
libraryDirectory
the result is the same if I setlibraryDirectory
to''
the result isimport Typography from "@mui/material//typography";
And if I try the customName
customName: (member: string) => '@mui/material/${member}'
the result is the same.How can I transform it? I think that there is a bug.
Reproduce link
isnt necessary
Reproduce Steps
build or dev
The text was updated successfully, but these errors were encountered: