处理antd-mobile款式被postcss转换的题目

思绪是在webpack里postcss-loader不对库的文件起作用。经由尝试设置以下:

                    {
                        test: /\.(css|less)$/,
                        use: [
                            require.resolve('style-loader'),
                            {
                                loader: require.resolve('css-loader'),
                                options: {
                                    sourceMap: true,
                                    importLoaders: 1,
                                },
                            },
                            {
                                loader: require.resolve('postcss-loader'),
                                options: postcssOptions,
                            },
                            {
                                loader: require.resolve('less-loader'),
                                options: {
                                    sourceMap: true,
                                    modifyVars: lessModifyVars,
                                },
                            },
                        ],
                        exclude: /node_modules/,
                    },
                    {
                        test: /\.(css|less)$/,
                        use: [
                            require.resolve('style-loader'),
                            {
                                loader: require.resolve('css-loader'),
                                options: {
                                    sourceMap: true,
                                    importLoaders: 1,
                                },
                            },
                            {
                                loader: require.resolve('less-loader'),
                                options: {
                                    sourceMap: true,
                                    modifyVars: lessModifyVars,
                                },
                            },
                        ],
                    },

显现就是一般的了。

    原文作者:ppsspp
    原文地址: https://segmentfault.com/a/1190000019212793
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞