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

如果打包生产的话,注释会被请除,那么/*no*/和/*px*/都会失效 #28

Open
cleartime opened this issue Mar 16, 2020 · 1 comment

Comments

@cleartime
Copy link

如题,这个怎么解决啊

@gaoming13
Copy link

原因:应该是前置的loader把注释给去除了,px2rem-postcss 就拿不到 /no/ /px/ 了

方法:比如说前置是 sass-loader,修改 options,让它不删除注释就可以了

'postcss-loader',
{
  loader: 'sass-loader',
  options: {
    sassOptions: {
      outputStyle: 'expanded',
    },
  },
},

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

2 participants