Skip to content

feat(css): support cssLoader.exportType as string#4717

Merged
chenjiahan merged 3 commits intomainfrom
css_loader_export_type_0306
Mar 6, 2025
Merged

feat(css): support cssLoader.exportType as string#4717
chenjiahan merged 3 commits intomainfrom
css_loader_export_type_0306

Conversation

@chenjiahan
Copy link
Copy Markdown
Member

Summary

When cssLoader.exportType is configured to string, the CSSExtractRspack should not be used, see https://github.com/webpack-contrib/css-loader?tab=readme-ov-file#string-3.

export default defineConfig({
  tools: {
    cssLoader: {
      exportType: 'string',
      modules: {
        namedExport: true,
      },
    },
  },
});

Related Links

resolve #4689

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 6, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit 2b6684e
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/67c90ec313d5eb0008e89502
😎 Deploy Preview https://deploy-preview-4717--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 46 (🟢 up 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@chenjiahan chenjiahan merged commit 70212a1 into main Mar 6, 2025
@chenjiahan chenjiahan deleted the css_loader_export_type_0306 branch March 6, 2025 03:07
@chenjiahan chenjiahan mentioned this pull request Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: build fails when trying to import CSS with tools.cssLoader.exportType = 'string'

1 participant