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

webpack插件.less文件怎么搞 #1

Closed
younth opened this issue Nov 24, 2015 · 4 comments
Closed

webpack插件.less文件怎么搞 #1

younth opened this issue Nov 24, 2015 · 4 comments

Comments

@younth
Copy link

younth commented Nov 24, 2015

            {
                test: /\.less$/,
                loader: 'style-loader!css-loader!autoprefixer-loader?{browsers:["android 4", "ios 6", "last 1 Chrome versions", "last 2 Safari versions"]}!less-loader'
            }

这是当前的的配置,想用px2rem-loader,但直接加到这个loader后面会报错,想问下处理less文件的话,要怎么配置呢?

@songsiqi
Copy link
Owner

songsiqi commented Dec 5, 2015

@younth 这样试试:

    {
        test: /\.less$/,
        loader: "style!css!px2rem!less"
    }

@younth
Copy link
Author

younth commented Dec 6, 2015

@songsiqi 来晚了,这个问题已经解决,多谢~

@peterzhai
Copy link

请问在Vue中怎么解决?

@fantasy525
Copy link

使用vue-cli的话可以配置postCss插件,使用postcss-px2rem这个插件,我是在stylus中写的css,你在less写的话应该一样

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants