mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-11-30 03:07:36 +08:00
parent
06b2cabf6b
commit
1a4905ec11
@ -1,6 +1,10 @@
|
|||||||
var Components = require('../components.json');
|
var Components = require('../components.json');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var dependencies = require('../package.json').dependencies;
|
var dependencies = require('../package.json').dependencies;
|
||||||
|
var fs = require('fs');
|
||||||
|
|
||||||
|
var utilsList = fs.readdirSync(path.resolve(__dirname, '../src/utils'));
|
||||||
|
var mixinsList = fs.readdirSync(path.resolve(__dirname, '../src/mixins'));
|
||||||
var externals = {};
|
var externals = {};
|
||||||
|
|
||||||
Object.keys(Components).forEach(function(key) {
|
Object.keys(Components).forEach(function(key) {
|
||||||
@ -12,11 +16,14 @@ Object.keys(dependencies).forEach(function(key) {
|
|||||||
externals[key] = key;
|
externals[key] = key;
|
||||||
});
|
});
|
||||||
|
|
||||||
externals['element-ui/src/utils/clickoutside'] = 'element-ui/lib/utils/clickoutside';
|
utilsList.forEach(function(file) {
|
||||||
externals['element-ui/src/utils/date'] = 'element-ui/lib/utils/date';
|
file = path.basename(file, '.js');
|
||||||
externals['element-ui/src/utils/popper'] = 'element-ui/lib/utils/popper';
|
externals[`element-ui/src/utils/${file}`] = `element-ui/lib/utils/${file}`;
|
||||||
externals['element-ui/src/utils/vue-popper'] = 'element-ui/lib/utils/vue-popper';
|
});
|
||||||
externals['element-ui/src/utils/resize-event'] = 'element-ui/lib/utils/resize-event';
|
mixinsList.forEach(function(file) {
|
||||||
|
file = path.basename(file, '.js');
|
||||||
|
externals[`element-ui/src/mixins/${file}`] = `element-ui/lib/mixins/${file}`;
|
||||||
|
});
|
||||||
|
|
||||||
exports.externals = Object.assign({
|
exports.externals = Object.assign({
|
||||||
vue: 'vue'
|
vue: 'vue'
|
||||||
|
Loading…
Reference in New Issue
Block a user