mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
32 lines
593 B
JavaScript
32 lines
593 B
JavaScript
const path = require('path');
|
|
const Components = require('../components.json');
|
|
const config = require('./webpack.build.js');
|
|
const webpack = require('webpack');
|
|
|
|
delete config.devtool;
|
|
|
|
const entry = {};
|
|
Object.keys(Components).forEach(key => {
|
|
entry[key + '/index'] = Components[key];
|
|
});
|
|
|
|
config.entry = entry;
|
|
|
|
config.externals = {
|
|
vue: {
|
|
root: 'Vue',
|
|
commonjs: 'vue',
|
|
commonjs2: 'vue',
|
|
amd: 'vue'
|
|
}
|
|
};
|
|
|
|
config.output = {
|
|
path: path.join(__dirname, '../lib'),
|
|
filename: '[name].js',
|
|
libraryExport: "default",
|
|
libraryTarget: 'umd'
|
|
};
|
|
|
|
module.exports = config;
|