Skip to content

Commit

Permalink
chore: set target to es5 for umd
Browse files Browse the repository at this point in the history
  • Loading branch information
pearmini committed Sep 7, 2023
1 parent a49624b commit 69af11d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ chart
.encode('x', 'genre') // Assign genre column to x position channel.
.encode('y', 'sold'); // Assign sold column to y position channel.

// Render visualization
// Render visualization.
chart.render();
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
},
{
"path": "dist/g2.min.js",
"limit": "1.2 Mb"
"limit": "1.5 Mb"
}
],
"author": {
Expand Down
16 changes: 14 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,21 @@ export default {
resolve(),
commonjs(),
typescript({
exclude: 'node_modules/**',
useTsconfigDeclarationDir: true,
extensions: ['.js', '.ts'],
tsconfigOverride: {
compilerOptions: {
target: 'es5',
downlevelIteration: true,
allowJs: true, // To transform js files in node_modules to es5.
declaration: false, // Avoid failing generate types from js files.
},
},
include: [
'*.ts+(|x)',
'**/*.ts+(|x)',
'**/node_modules/**/*.js+(|x)',
'**/node_modules/**/*.js+(|x)',
],
}),
terser(),
],
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
"baseUrl": "src",
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
"include": ["src/**/*"]
}

0 comments on commit 69af11d

Please sign in to comment.