12345678910111213141516171819202122232425262728 |
- const path = require('path')
- module.exports = ({ webpack }) => {
- const designWidth = webpack.resourcePath.includes(
- path.join('node_modules', 'vant')
- )
- ? 375
- : 750
- return {
- plugins: {
- autoprefixer: {},
- 'postcss-px-to-viewport': {
- unitToConvert: 'px',
- viewportWidth: designWidth,
- unitPrecision: 6,
- propList: ['*'],
- viewportUnit: 'vw',
- fontViewportUnit: 'vw',
- selectorBlackList: [],
- minPixelValue: 1,
- mediaQuery: true,
- exclude: [],
- landscape: false
- }
- }
- }
- }
|