-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to compile React Component with less or css? #6
Comments
You can modify your bundler config and put less, sass or css modules loaders at rules... I didn't have much time, but my idea is create something like But if you want to modify your bundler config, just use the // doczrc.js
export default {
modifyBundlerConfig: (config) => {
/* put your custom loaders logic here */
return config
}
} |
You need to put the loader of sass or less. // doczrc.js
export default {
modifyBundlerConfig: (config) => {
config.module.rules.push({
test: /\.scss$/,
use: ["style-loader", "css-loader", "sass-loader"]
})
return config
}
} yarn add style-loader css-loader sass-loader --dev Read more here: https://github.com/webpack-contrib/sass-loader |
After released v0.2.11 you can use docz-plugin-css to configure your CSS just by adding a plugin ✌️ |
How to compile React Component with less or css? Our UI Library in private npm registry just compiled to es5 and we didn't compile less(We compiled less in our business project with webpack).
The text was updated successfully, but these errors were encountered: