Replies: 2 comments 2 replies
-
The component library is easy to adopt because it does not require the app to configure a toolchain to use Less or Sass. However, providing Less or Sass files is also an option, as seen in antd 4.x. In summary, the differences between using CSS and Less are:
In our case, we currently only provide CSS, which is a simpler and more universal option. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Rslib provides redirect.style and output.copy configurations, this can be used to keep export default defineConfig({
source: {
entry: {
index: ['./src/**'],
},
},
lib: [
{
format: 'esm',
bundle: false,
// Turn off the redirect of the style file
redirect: {
style: false,
},
},
],
output: {
target: 'web',
// copy .scss files
copy: [{ from: '**/*.scss', context: path.join(__dirname, 'src') }],
},
plugins: [pluginSass()],
}); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello team,
I'd like to understand the rationale behind transforming Less/SCSS to CSS in bundless mode. Currently, when using rslib in bundless mode, it still processes Less/SCSS files into CSS.
Some questions I have:
What's the main reason for this design decision?
Would it make more sense to skip the CSS preprocessing in bundless mode and let developers handle it with their preferred tools?
Are there specific use cases or developer experiences that benefit from this approach?
I believe understanding this design choice would help me better utilize rslib in my projects.
Thanks for any insights you can provide!
Beta Was this translation helpful? Give feedback.
All reactions