mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-05 19:41:57 +08:00
fix: 修复 viteLegacy 配置问题
This commit is contained in:
parent
b6ba33df6e
commit
aec267f83f
@ -37,6 +37,7 @@ export default async (api) => {
|
||||
modernPolyfills: true,
|
||||
renderLegacyChunks: false,
|
||||
targets,
|
||||
...api.config.viteLegacy,
|
||||
}),
|
||||
splitVendorChunkPlugin(),
|
||||
],
|
||||
|
@ -5,33 +5,39 @@ import { defineBuildConfig } from '@fesjs/fes';
|
||||
export default defineBuildConfig({
|
||||
proxy: {
|
||||
'/v2': {
|
||||
'target': 'https://api.douban.com/',
|
||||
'changeOrigin': true,
|
||||
}
|
||||
target: 'https://api.douban.com/',
|
||||
changeOrigin: true,
|
||||
},
|
||||
},
|
||||
publicPath: '/',
|
||||
html: {
|
||||
title: '拉夫德鲁'
|
||||
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,
|
||||
},
|
||||
extraPostCSSPlugins: [
|
||||
pxtoviewport({
|
||||
unitToConvert: 'px',
|
||||
viewportWidth: 375,
|
||||
unitPrecision: 5,
|
||||
propList: ['*'],
|
||||
viewportUnit: 'vw',
|
||||
fontViewportUnit: 'vw',
|
||||
selectorBlackList: [],
|
||||
minPixelValue: 1,
|
||||
mediaQuery: false,
|
||||
replace: true,
|
||||
exclude: [],
|
||||
landscape: false,
|
||||
landscapeUnit: 'vw'
|
||||
})
|
||||
],
|
||||
devServer: {
|
||||
port: 8000
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -1,8 +1,3 @@
|
||||
// .fes.js 只负责管理编译时配置,只能使用plain Object
|
||||
|
||||
|
||||
export default {
|
||||
request: {
|
||||
base: '/api'
|
||||
}
|
||||
};
|
||||
export default {};
|
||||
|
@ -39,14 +39,12 @@
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ttou/postcss-px-to-viewport": "1.1.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ttou/postcss-px-to-viewport": "1.1.4",
|
||||
"@fesjs/fes": "^3.0.0-rc.0",
|
||||
"@fesjs/plugin-icon": "^3.0.0-rc.0",
|
||||
"@fesjs/plugin-request": "^3.0.0-rc.0",
|
||||
"@fesjs/builder-webpack": "^3.0.0-rc.0",
|
||||
"@fesjs/builder-vite": "^3.0.0-rc.1",
|
||||
"vue": "^3.2.37"
|
||||
},
|
||||
"private": true
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { defineRuntimeConfig } from '@fesjs/fes';
|
||||
|
||||
export default defineRuntimeConfig({
|
||||
request: {},
|
||||
// request: {},
|
||||
});
|
||||
|
||||
// export default defineRuntimeConfig({
|
||||
|
Loading…
x
Reference in New Issue
Block a user