Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

feat: 添加postcss 配置项 #233

Merged
merged 2 commits into from
Sep 20, 2019
Merged

feat: 添加postcss 配置项 #233

merged 2 commits into from
Sep 20, 2019

Conversation

newset
Copy link
Member

@newset newset commented Sep 17, 2019

添加 postcss 配置项,用于添加 less/stylus/sass 的配置 等

# remax.config.js

{
    postcss: {
        use: [
            ['less', { 
                paths: [path.resolve(__dirname, 'src/asset/style')] 
            }]
        ]
    }
}

@yesmeck
Copy link
Member

yesmeck commented Sep 17, 2019

文档也更新下吧

@newset
Copy link
Member Author

newset commented Sep 18, 2019

文档也更新下吧

加了

@@ -148,6 +148,7 @@ export default function rollupConfig(
]),
}),
postcss({
...options.postcss,
extract: true,
modules: cssModuleConfig,
plugins: [pxToUnits(), postcssUrl(options)],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果要支持配置的话,是不是插件也应该可配置

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果要支持配置的话,是不是插件也应该可配置

嗯,重写了下。用户配置的插件是拼接在默认插件之后的。
文档也做了调整。

@Darmody
Copy link
Contributor

Darmody commented Sep 20, 2019

LGTM

@yesmeck yesmeck merged commit 646a03d into remaxjs:develop Sep 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants