You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.0 KiB
42 lines
1.0 KiB
const path = require("path"); |
|
function resolve(dir) { |
|
return path.join(__dirname, dir); |
|
} |
|
|
|
const projectName = require("./package.json").name; |
|
|
|
module.exports = { |
|
// postcss-px-to-viewport配置 https://github.com/evrone/postcss-px-to-viewport/blob/HEAD/README_CN.md |
|
css: { |
|
loaderOptions: { |
|
postcss: { |
|
plugins: [ |
|
require("postcss-px-to-viewport")({ |
|
unitToConvert: "px", |
|
viewportWidth: 1536, |
|
viewportHeight: 491, |
|
unitPrecision: 3, |
|
propList: ["*"], |
|
viewportUnit: "vw", |
|
fontViewportUnit: "vw", |
|
selectorBlackList: [], |
|
minPixelValue: 1, |
|
// (Boolean) 媒体查询里的单位是否需要转换单位 |
|
mediaQuery: false, |
|
replace: true, |
|
exclude: /(\/|\\)(node_modules)(\/|\\)/ |
|
}) |
|
] |
|
} |
|
} |
|
}, |
|
configureWebpack: { |
|
devtool: "source-map", |
|
name: projectName, |
|
resolve: { |
|
alias: { |
|
"@": resolve("src") |
|
} |
|
} |
|
} |
|
};
|
|
|