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-chain? #2

Open
Kujo-Jotaro-AAAAA opened this issue Sep 9, 2020 · 0 comments
Open

该怎么集成到webpack-chain? #2

Kujo-Jotaro-AAAAA opened this issue Sep 9, 2020 · 0 comments

Comments

@Kujo-Jotaro-AAAAA
Copy link

设置后,不生效。。
chainWebpack(config) { config.module .rule('pxtovw') .test(/.css$/) .use('pxtovw-loader') .loader(path.resolve('./loaders/inline-style-px-to-vw.js')) .options({ unitToConvert: 'px', // 自定义转换单位 viewportWidth: 375, // 视口宽度 unitPrecision: 5, // 保留小数位 minPixelValue: 2 // 最小转换数值 }) .end().exclude.add([path.resolve('../src/pages/.umi'), path.resolve('node_modules')]) }

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