-
-
Notifications
You must be signed in to change notification settings - Fork 549
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
[Bug]: transformImport did not import styles. #6245
Comments
the cause might be when i changed it to will transfer the issue to rspack for help tomorrow. |
webpack's implementation: // https://npmjs.com/glob-to-regexp
const glob2regexp = require('glob-to-regexp');
const globToRegexp = (glob) => {
if (!glob.includes("/")) {
glob = `**/${glob}`;
}
const baseRegexp = glob2regexp(glob, { globstar: true, extended: true });
const regexpSource = baseRegexp.source;
const regexp = new RegExp("^(\\./)?" regexpSource.slice(1));
return regexp;
};
globToRegexp('**/*/style.js').test('esm/input/style.js'); // true
// the regexp is /^(\.\/)?((?:[^/]*(?:\/|$))*)([^/]*)\/style\.js$/ while glob-match: |
This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment! |
Version
Details
rsbuild.config.ts
I used transformImport to configure modular import, but the styles were not imported on demand. As you can see, the input box below lacks styling.
Reproduce link
https://github.com/TopGrd/rsbuild-transformImport
Reproduce Steps
The text was updated successfully, but these errors were encountered: