Webpack 4 less / css编译顺序错误

时间:2018-12-17 15:26:58

标签: javascript webpack less webpack-style-loader

我有一个style.less,它可以导入css和更少的文件,如下所示:

@import './less/bootstrap.less';
@import './css/workflowMap.css';

在编译后的文件中,我有一个反向输出(首先是flowMap.css,然后是bootstrap.less)

我的webpack配置如下:

    {
        test: /\.(le|c)ss$/,

        use: [
            "style-loader",
            MiniCssExtractPlugin.loader,
            "css-loader",
            {
                loader: "postcss-loader",
                options: {
                    plugins: loader => [require("autoprefixer")]
                }
            },
            {
                loader: "less-loader",
                options: {
                    modifyVars : { ...globalVars },
                    paths: [...paths]
                }
            }
        ]
    },

0 个答案:

没有答案