Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ssr): add server-side rendering #15880

Merged
merged 17 commits into from
Oct 15, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: optimize esbuild output
  • Loading branch information
pissang committed Oct 14, 2021
commit 708da07615cd9e4ceab10276d1673798ce0063e0
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