提交 fda1b36f 编写于 作者: S sushuang

tweak

上级 1e2e5e7c
...@@ -61,6 +61,7 @@ exports.createECharts = function (opt) { ...@@ -61,6 +61,7 @@ exports.createECharts = function (opt) {
name: 'echarts', name: 'echarts',
format: 'umd', format: 'umd',
sourcemap: !opt.min && !postfixType, sourcemap: !opt.min && !postfixType,
legacy: true, // Must be declared both in inputOptions and outputOptions.
file: getPath(`dist/echarts${postfixLang}${postfixType}${postfixMin}.js`) file: getPath(`dist/echarts${postfixLang}${postfixType}${postfixMin}.js`)
}, },
watch: { watch: {
...@@ -84,6 +85,7 @@ exports.createBMap = function (min) { ...@@ -84,6 +85,7 @@ exports.createBMap = function (min) {
name: 'bmap', name: 'bmap',
format: 'umd', format: 'umd',
sourcemap: !min, sourcemap: !min,
legacy: true, // Must be declared both in inputOptions and outputOptions.
globals: { globals: {
// For UMD `global.echarts` // For UMD `global.echarts`
echarts: 'echarts' echarts: 'echarts'
...@@ -110,6 +112,7 @@ exports.createDataTool = function (min) { ...@@ -110,6 +112,7 @@ exports.createDataTool = function (min) {
name: 'dataTool', name: 'dataTool',
format: 'umd', format: 'umd',
sourcemap: !min, sourcemap: !min,
legacy: true, // Must be declared both in inputOptions and outputOptions.
globals: { globals: {
// For UMD `global.echarts` // For UMD `global.echarts`
echarts: 'echarts' echarts: 'echarts'
...@@ -122,17 +125,3 @@ exports.createDataTool = function (min) { ...@@ -122,17 +125,3 @@ exports.createDataTool = function (min) {
}; };
}; };
/**
* @param {string} [absolutePath]
*/
exports.createSingleModule = function (absolutePath) {
return {
plugins: getPlugins(),
input: absolutePath,
legacy: true, // Support IE8-
output: {
name: 'echarts',
format: 'amd'
}
};
};
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
rollup.rollup({ rollup.rollup({
input: TOP_MODULE_NAME, input: TOP_MODULE_NAME,
legacy: true,
plugins: [{ plugins: [{
resolveId: function (importee, importor) { resolveId: function (importee, importor) {
if (importee === TOP_MODULE_NAME) { if (importee === TOP_MODULE_NAME) {
...@@ -117,12 +118,9 @@ ...@@ -117,12 +118,9 @@
} }
}] }]
}).then(function (bundle) { }).then(function (bundle) {
var external = [];
for (var i = 0; i < bundle.imports.length; i++) {
external.push();
}
return bundle.generate({ return bundle.generate({
format: 'iife', format: 'iife',
legacy: true,
name: TOP_MODULE_NAME name: TOP_MODULE_NAME
}); });
}).then(function (result) { }).then(function (result) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册