J
J
Joseph Kopeikin2017-10-11 10:40:25
css
Joseph Kopeikin, 2017-10-11 10:40:25

How to attach stylus to css modules?

The project uses cssmodules

{
                        test: /\.css$/,
                        use: [
                            require.resolve('style-loader'), {
                                loader: require.resolve('css-loader'),
                                options: {
                                    importLoaders: 1,
                                    modules: true,
                                    localIdentName: "[name]__[local]___[hash:base64:5]"
                                }
                            }, {
                                loader: require.resolve('postcss-loader'),
                                options: {
                                    // Necessary for external CSS imports to work
                                    // https://github.com/facebookincubator/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'
                                        }),
                                        require('postcss-modules-values')
                                    ]
                                }
                            }
                        ]
                    },

How to screw stylus?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question