Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

增加 postcss-loader 对独立样式文件的处理 #134

Closed
xiaoiver opened this issue Apr 13, 2018 · 0 comments
Closed

增加 postcss-loader 对独立样式文件的处理 #134

xiaoiver opened this issue Apr 13, 2018 · 0 comments
Assignees
Labels

Comments

@xiaoiver
Copy link
Contributor

问题描述

.vue 文件中 postcss 插件生效,在独立样式文件中不生效。

问题原因

在针对 .less .stylus .scss 文件的处理规则中,目前只有 css-loader + 各自 loader。
需要增加 postcss-loader。而 .vue 文件处理规则中包含,所以生效。

utils/loader.js

let cssLoader = {
    loader: 'css-loader',
    options: {
        minimize: options.cssMinimize,
        sourceMap: options.cssSourceMap
    }
};

// generate loader string to be used with extract text plugin
function generateLoaders(loader, loaderOptions) {
    let loaders = [cssLoader];
xiaoiver added a commit that referenced this issue Apr 13, 2018
@xiaoiver xiaoiver self-assigned this Apr 13, 2018
@xiaoiver xiaoiver added the bug label Apr 13, 2018
easonyq pushed a commit that referenced this issue Apr 16, 2018
* fix: #134

* 添加 .postcssrc.js 避免测试用例报错

* 修复测试用例的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant