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中配置 #41

Open
mushan0x0 opened this issue Feb 12, 2019 · 0 comments
Open

请问如何在webpack中配置 #41

mushan0x0 opened this issue Feb 12, 2019 · 0 comments

Comments

@mushan0x0
Copy link

我是这样配置的:

[{
  test: /\.(js|mjs|jsx|ts|tsx)$/,
  loader: require.resolve('babel-loader'),
}, {
  loader: require.resolve('postcss-loader'),
  options: {
    syntax: require.resolve('postcss-styled'),
    plugins: [
      require('postcss-px-to-viewport')({
        viewportWidth: 750,
      }),
    ],
  },
}]

我希望在tsx文件中使用styled时将px单位装换成vw单位,但是没有效果

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

1 participant