-
Notifications
You must be signed in to change notification settings - Fork 49
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
react 中使用stylus 配置px2rem 无效 #26
Comments
请问解决了吗 我是在less中无效 |
还没有。。。 |
我解决了 你把配置放到最下面试试 |
const {override,addWebpackAlias,addPostcssPlugins} = require('customize-cra') const stylus = () => (config) => { module.exports = { |
`const { const stylus = () => (config) => { module.exports = { |
|
图上有的啊,webpack.config.prod.js |
{
test: /.styl$/,
use: [
require.resolve('style-loader'),
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
},
},
{
loader: require.resolve('postcss-loader'),
options: {
// Necessary for external CSS imports to work
// https://github.com/facebook/create-react-app/issues/2677
ident: 'postcss',
plugins: () => [
require('postcss-flexbugs-fixes'),
autoprefixer({
browsers: [
'>1%',
'last 4 versions',
'Firefox ESR',
'not ie < 9', // React doesn't support IE8 anyway
],
flexbox: 'no-2009',
}),
px2rem({ remUnit: 37.5 })
],
},
},
{
loader: require.resolve('stylus-loader')
}
],
}
The text was updated successfully, but these errors were encountered: