sdk 打包策略小调整

This commit is contained in:
liaoxuezhi 2019-08-05 17:13:50 +08:00
parent e00cd44d4e
commit 4e8861e5e1
2 changed files with 14 additions and 20 deletions

View File

@ -9,8 +9,6 @@ const mapping: {
'react-dom': __moduleId('react-dom'),
'react-addons-update': __moduleId('react-addons-update'),
'immutability-helper': __moduleId('react-addons-update'),
'react-router': __moduleId('react-router'),
'react-select': __moduleId('react-select'),
'react-cropper': __moduleId('react-cropper'),
'react-dropzone': __moduleId('react-dropzone'),
'react-bootstrap': __moduleId('react-bootstrap'),
@ -23,26 +21,11 @@ const mapping: {
'echarts': __moduleId('echarts'),
'zrender': __moduleId('zrender'),
'sortablejs': __moduleId('sortablejs'),
'history': __moduleId('history'),
'amis': __moduleId('../src'),
'amis/embed': __moduleId('./embed.tsx'),
'prop-types': __moduleId('prop-types'),
'async': __moduleId('async'),
'qs': __moduleId('qs'),
'lodash/find': __moduleId('lodash/find'),
'lodash/findLast': __moduleId('lodash/findLast'),
'lodash/chunk': __moduleId('lodash/chunk'),
'lodash/flatMap': __moduleId('lodash/flatMap'),
'lodash/isEqual': __moduleId('lodash/isEqual'),
'lodash/transform': __moduleId('lodash/transform'),
'lodash/debounce': __moduleId('lodash/debounce'),
'lodash/difference': __moduleId('lodash/difference'),
'lodash/partition': __moduleId('lodash/partition'),
'lodash/forEach': __moduleId('lodash/forEach'),
'lodash/omit': __moduleId('lodash/omit'),
'lodash/pick': __moduleId('lodash/pick'),
'lodash/isPlainObject': __moduleId('lodash/isPlainObject'),
'lodash/isObject': __moduleId('lodash/isObject'),
'qs': __moduleId('qs')
};
function amisRequire(...args: Array<any>) {

View File

@ -297,7 +297,6 @@ if (fis.project.currentMedia() === 'publish') {
packager: fis.plugin('deps-pack', {
'sdk.js': [
'examples/sdk-mod.js',
'/node_modules/**.js',
'examples/embed.tsx',
'examples/embed.tsx:deps',
'!monaco-editor/**',
@ -320,7 +319,19 @@ if (fis.project.currentMedia() === 'publish') {
'echarts.js': [
'zrender/**',
'echarts/**',
]
],
'rest.js': [
'*.js',
'!monaco-editor/**',
'!flv.js/**',
'!hls.js/**',
'!froala-editor/**',
'!src/components/RichText.tsx',
'!jquery/**',
'!zrender/**',
'!echarts/**',
],
}),
postpackager: [
fis.plugin('loader', {