mirror of
https://gitee.com/WeBank/fes.js.git
synced 2024-12-05 05:08:09 +08:00
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
// fes.config.js 只负责管理 cli 相关的配置
|
|
import pxtoviewport from '@ttou/postcss-px-to-viewport';
|
|
import { defineBuildConfig } from '@fesjs/fes';
|
|
|
|
export default defineBuildConfig({
|
|
proxy: {
|
|
'/v2': {
|
|
target: 'https://api.douban.com/',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
publicPath: '/',
|
|
viteOption: {
|
|
css: {
|
|
postcss: {
|
|
plugins: [
|
|
pxtoviewport({
|
|
unitToConvert: 'px',
|
|
viewportWidth: 375,
|
|
unitPrecision: 5,
|
|
propList: ['*'],
|
|
viewportUnit: 'vw',
|
|
fontViewportUnit: 'vw',
|
|
selectorBlackList: [],
|
|
minPixelValue: 1,
|
|
mediaQuery: false,
|
|
replace: true,
|
|
exclude: [],
|
|
landscape: false,
|
|
landscapeUnit: 'vw',
|
|
}),
|
|
],
|
|
},
|
|
},
|
|
build: {
|
|
target: 'es2015',
|
|
},
|
|
},
|
|
targets: {
|
|
chrome: 61,
|
|
ios: 11,
|
|
},
|
|
});
|