mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-24 10:33:50 +08:00
fix: 配置文件公共路径无效 (#3007)
This commit is contained in:
parent
aaf2fde3cf
commit
a244dcd261
@ -21,7 +21,10 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
|
|||||||
return defineConfig(async ({ command, mode }) => {
|
return defineConfig(async ({ command, mode }) => {
|
||||||
const root = process.cwd();
|
const root = process.cwd();
|
||||||
const isBuild = command === 'build';
|
const isBuild = command === 'build';
|
||||||
const { VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_ENABLE_ANALYZE } = loadEnv(mode, root);
|
const { VITE_PUBLIC_PATH, VITE_USE_MOCK, VITE_BUILD_COMPRESS, VITE_ENABLE_ANALYZE } = loadEnv(
|
||||||
|
mode,
|
||||||
|
root,
|
||||||
|
);
|
||||||
|
|
||||||
const defineData = await createDefineData(root);
|
const defineData = await createDefineData(root);
|
||||||
const plugins = await createPlugins({
|
const plugins = await createPlugins({
|
||||||
@ -35,6 +38,7 @@ function defineApplicationConfig(defineOptions: DefineOptions = {}) {
|
|||||||
const pathResolve = (pathname: string) => resolve(root, '.', pathname);
|
const pathResolve = (pathname: string) => resolve(root, '.', pathname);
|
||||||
|
|
||||||
const applicationConfig: UserConfig = {
|
const applicationConfig: UserConfig = {
|
||||||
|
base: VITE_PUBLIC_PATH,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: [
|
alias: [
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user