如何让css modules hash Stylus(CSS预处理器)的类名?

这是我的webpack配置

    module: {
        loaders: [ {
            test: /\.css$/,
            loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&camelCase!postcss-loader')
        } {
            test: /\.styl$/,
            loader: ExtractTextPlugin.extract('style-loader', 'css-loader?modules&camelCase!stylus-loader')
        }]
    },
    stylus: {
        use: [
            poststylus(['autoprefixer'])
        ]
    },
    postcss: [
        valudes,
        autoprefixer({browsers: ['> 5%', 'last 2 versions', 'Firefox ESR']})
    ]
阅读 4.4k
1 个回答

解决了,是loader加载顺序的问题

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题