[go: up one dir, main page]

Skip to content

Commit

Permalink
chore: fix extension build error
Browse files Browse the repository at this point in the history
  • Loading branch information
pissang committed Dec 24, 2021
1 parent 5e774eb commit 7ce052d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/pre-publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,11 +288,11 @@ function singleTransformImport(code, replacement) {
return transformImport(
code.replace(/([\"\'])zrender\/src\//g, `$1zrender/${replacement}/`),
(moduleName) => {
// Ignore 'tslib'
if (moduleName === 'tslib') {
// Ignore 'tslib' and 'echarts' in the extensions.
if (moduleName === 'tslib' || moduleName === 'echarts') {
return moduleName;
}
else if (moduleName === 'zrender' || moduleName === 'zrender/lib/export') {
else if (moduleName === 'zrender/lib/export') {
throw new Error('Should not import the whole zrender library.');
}
else if (moduleName.endsWith('.ts')) {
Expand Down

0 comments on commit 7ce052d

Please sign in to comment.