mirror of https://github.com/ElemeFE/element
Update externals (#641)
parent
b97e372b60
commit
4dd8b094cb
|
@ -8,8 +8,7 @@ var mixinsList = fs.readdirSync(path.resolve(__dirname, '../src/mixins'));
|
|||
var externals = {};
|
||||
|
||||
Object.keys(Components).forEach(function(key) {
|
||||
externals[`element-ui/packages/${key}/index.js`] = `element-ui/lib/${key}`;
|
||||
externals[`element-ui/packages/${key}/style.css`] = `element-ui/lib/${key}/style.css`;
|
||||
externals[`element-ui/packages/${key}`] = `element-ui/lib/${key}`;
|
||||
});
|
||||
|
||||
Object.keys(dependencies).forEach(function(key) {
|
||||
|
|
|
@ -78,14 +78,6 @@ var wrap = function(render) {
|
|||
};
|
||||
};
|
||||
|
||||
var externals = {};
|
||||
Object.keys(Components).forEach(function(key) {
|
||||
externals[`element-ui/packages/${key}/style.css`] = 'null';
|
||||
});
|
||||
|
||||
// 开发模式不需要将不存在的 style.css 打包进去
|
||||
cooking.add('externals', externals);
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
cooking.add('externals.vue', 'Vue');
|
||||
cooking.add('externals.vue-router', 'VueRouter');
|
||||
|
|
|
@ -7,7 +7,9 @@ cooking.set({
|
|||
entry: './src/index.js',
|
||||
extends: process.env.CI_ENV ? ['vue2'] : ['vue2', 'lint'],
|
||||
minimize: false,
|
||||
alias: config.alias,
|
||||
alias: Object.assign(config.alias, {
|
||||
'vue$': 'vue/dist/vue.js'
|
||||
}),
|
||||
postcss: config.postcss,
|
||||
sourceMap: '#inline-source-map'
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"pub": "sh build/release.sh",
|
||||
"pub:all": "npm run dist:all && lerna publish",
|
||||
"build:utils": "babel src/utils --out-dir lib/utils",
|
||||
"clean": "rimraf lib && rimraf packages/*/lib",
|
||||
"clean": "rimraf lib && rimraf packages/*/lib && rimraf test/**/coverage",
|
||||
"lint": "eslint src/**/* test/**/* packages/**/*.{js,vue} build/**/* --quiet",
|
||||
"test:watch": "karma start test/unit/karma.conf.js",
|
||||
"test": "npm run lint && CI_ENV=/dev/ karma start test/unit/karma.conf.js --single-run"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ElInput from 'element-ui/packages/input/index.js';
|
||||
import ElInput from 'element-ui/packages/input';
|
||||
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import ElInput from 'element-ui/packages/input/index.js';
|
||||
import ElInput from 'element-ui/packages/input';
|
||||
import { once, on } from 'wind-dom/src/event';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
};
|
||||
|
||||
import Popup from 'vue-popup';
|
||||
import ElInput from 'element-ui/packages/input/index.js';
|
||||
import ElButton from 'element-ui/packages/button/index.js';
|
||||
import ElInput from 'element-ui/packages/input';
|
||||
import ElButton from 'element-ui/packages/button';
|
||||
import { addClass, removeClass } from 'wind-dom/src/class';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Vue from 'vue';
|
||||
import Pager from './pager.vue';
|
||||
import ElSelect from 'element-ui/packages/select/index.js';
|
||||
import ElOption from 'element-ui/packages/option/index.js';
|
||||
import ElSelect from 'element-ui/packages/select';
|
||||
import ElOption from 'element-ui/packages/option';
|
||||
|
||||
export default {
|
||||
name: 'ElPagination',
|
||||
|
|
|
@ -15,7 +15,7 @@ npm i el-select -D
|
|||
|
||||
// import component
|
||||
import Component from 'el-select'
|
||||
import ''el-select/lib/style.css'
|
||||
import 'el-select/lib/style.css'
|
||||
|
||||
Vue.use(Component)
|
||||
```
|
||||
|
|
|
@ -65,9 +65,9 @@
|
|||
|
||||
<script type="text/babel">
|
||||
import emitter from 'element-ui/src/mixins/emitter';
|
||||
import ElInput from 'element-ui/packages/input/index.js';
|
||||
import ElInput from 'element-ui/packages/input';
|
||||
import ElSelectMenu from './select-dropdown.vue';
|
||||
import ElTag from 'element-ui/packages/tag/index.js';
|
||||
import ElTag from 'element-ui/packages/tag';
|
||||
import debounce from 'throttle-debounce/debounce';
|
||||
import Clickoutside from 'element-ui/src/utils/clickoutside';
|
||||
import { addClass, removeClass, hasClass } from 'wind-dom/src/class';
|
||||
|
|
|
@ -35,8 +35,8 @@
|
|||
</template>
|
||||
|
||||
<script type="text/babel">
|
||||
import ElInputNumber from 'element-ui/packages/input-number/index.js';
|
||||
import ElTooltip from 'element-ui/packages/tooltip/index.js';
|
||||
import ElInputNumber from 'element-ui/packages/input-number';
|
||||
import ElTooltip from 'element-ui/packages/tooltip';
|
||||
import { getStyle } from 'wind-dom/src/style';
|
||||
|
||||
export default {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ElCheckbox from 'element-ui/packages/checkbox/index.js';
|
||||
import ElTag from 'element-ui/packages/tag/index.js';
|
||||
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||
import ElTag from 'element-ui/packages/tag';
|
||||
import objectAssign from 'object-assign';
|
||||
|
||||
let columnIdSeed = 1;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import ElCheckbox from 'element-ui/packages/checkbox/index.js';
|
||||
import ElTag from 'element-ui/packages/tag/index.js';
|
||||
import ElCheckbox from 'element-ui/packages/checkbox';
|
||||
import ElTag from 'element-ui/packages/tag';
|
||||
|
||||
export default {
|
||||
name: 'el-table-header',
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import UploadList from './upload-list';
|
||||
import Upload from './upload';
|
||||
import IframeUpload from './iframe-upload';
|
||||
import ElProgress from 'element-ui/packages/progress/index.js';
|
||||
import ElProgress from 'element-ui/packages/progress';
|
||||
|
||||
function noop() {
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import Vue from 'vue/dist/vue';
|
||||
import Vue from 'vue';
|
||||
import Element from 'main/index.js';
|
||||
|
||||
Vue.use(Element);
|
||||
|
|
Loading…
Reference in New Issue