vant/packages/vant-cli/src/config/webpack.site.prd.ts
2019-11-29 17:11:07 +08:00

24 lines
646 B
TypeScript

import merge from 'webpack-merge';
import { get } from 'lodash';
import { 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', '/');
export const sitePrdConfig = merge(
siteDevBaseConfig,
{
mode: 'production',
stats: 'none',
output: {
publicPath,
path: outputDir,
filename: '[name].[hash:8].js',
chunkFilename: 'async_[name].[chunkhash:8].js'
}
},
getWebpackConfig()
);