mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(cli): always use '/' as publicPath in dev mode
This commit is contained in:
parent
cd552dd0a6
commit
3d8f3c36aa
@ -99,4 +99,8 @@ export function setNodeEnv(value: NodeEnv) {
|
||||
process.env.NODE_ENV = value;
|
||||
}
|
||||
|
||||
export function isDev() {
|
||||
return process.env.NODE_ENV === 'development';
|
||||
}
|
||||
|
||||
export { decamelize };
|
||||
|
@ -1,11 +1,13 @@
|
||||
import merge from 'webpack-merge';
|
||||
import { get } from 'lodash';
|
||||
import { getWebpackConfig } from '../common';
|
||||
import { isDev, getWebpackConfig } from '../common';
|
||||
import { siteDevBaseConfig } from './webpack.site.dev';
|
||||
import { CONFIG, SITE_DIST_DIR } from '../common/constant';
|
||||
|
||||
const outputDir = get(CONFIG, 'build.site.outputDir', SITE_DIST_DIR);
|
||||
const publicPath = get(CONFIG, 'build.site.publicPath', '/');
|
||||
|
||||
// always use '/' as publicPath in dev mode
|
||||
const publicPath = isDev() ? '/' : get(CONFIG, 'build.site.publicPath', '/');
|
||||
|
||||
export const sitePrdConfig = merge(
|
||||
siteDevBaseConfig,
|
||||
|
Loading…
x
Reference in New Issue
Block a user