[go: up one dir, main page]

Skip to content

Commit

Permalink
chore: optimize esbuild output
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Oct 14, 2021
1 parent d51777e commit 708da07
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions build/dev-fast.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,7 @@ const {build} = require('esbuild');
const commander = require('commander');
const outFilePath = path.resolve(__dirname, '../dist/echarts.js');

const umdMark = '// ------------- WRAPPED UMD --------------- //';
const umdWrapperHead = `
${umdMark}
(function () {
var g = typeof self !== 'undefined' ? self : this;
g.__DEV__ = true;
g.process = { env: { NODE_ENV: 'development' } };
})();
(function (root, factory) {
const umdWrapperHead = `(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports'], factory);
Expand All @@ -57,7 +49,8 @@ build({
banner: umdWrapperHead,
footer: umdWrapperTail,
define: {
'process.env.NODE_ENV': '"development"'
'process.env.NODE_ENV': '"development"',
'__DEV__': 'true'
},
watch: {
async onRebuild(error) {
Expand Down

0 comments on commit 708da07

Please sign in to comment.