mirror of
https://github.com/youzan/vant.git
synced 2026-05-14 01:08:25 +08:00
feat(cli): auto install all components
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
import merge from 'webpack-merge';
|
||||
import { join } from 'path';
|
||||
import { baseConfig } from './webpack.base';
|
||||
import { getWebpackConfig } from '../common';
|
||||
import { LIB_DIR, DIST_DIR, CONFIG_FILE } from '../common/constant';
|
||||
import { LIB_DIR, CONFIG_FILE, PACKAGE_ENTRY_FILE } from '../common/constant';
|
||||
|
||||
// eslint-disable-next-line
|
||||
const config = require(CONFIG_FILE);
|
||||
@@ -14,7 +13,7 @@ export function packageConfig(isMinify: boolean) {
|
||||
{
|
||||
mode: 'production',
|
||||
entry: {
|
||||
[name]: join(DIST_DIR, 'index.js')
|
||||
[name]: PACKAGE_ENTRY_FILE
|
||||
},
|
||||
stats: 'none',
|
||||
output: {
|
||||
|
||||
@@ -2,7 +2,7 @@ import merge from 'webpack-merge';
|
||||
import HtmlWebpackPlugin from 'html-webpack-plugin';
|
||||
import { join } from 'path';
|
||||
import { baseConfig } from './webpack.base';
|
||||
import { CONFIG_FILE } from '../common/constant';
|
||||
import { CONFIG_FILE, MOBILE_ENTRY_FILE, DESKTOP_ENTRY_FILE } from '../common/constant';
|
||||
import { getWebpackConfig } from '../common';
|
||||
|
||||
// eslint-disable-next-line
|
||||
@@ -22,6 +22,12 @@ export const siteDevConfig = merge(
|
||||
stats: 'errors-only',
|
||||
disableHostCheck: true
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'mobile-entry': MOBILE_ENTRY_FILE,
|
||||
'desktop-entry': DESKTOP_ENTRY_FILE
|
||||
}
|
||||
},
|
||||
output: {
|
||||
path: join(__dirname, '../../site/dist'),
|
||||
publicPath: '/',
|
||||
|
||||
Reference in New Issue
Block a user