diff --git a/README.md b/README.md index 27b7a3a36a..eb165943f4 100644 --- a/README.md +++ b/README.md @@ -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(); ``` diff --git a/package.json b/package.json index dfd3539605..03bb53ee5d 100644 --- a/package.json +++ b/package.json @@ -151,7 +151,7 @@ }, { "path": "dist/g2.min.js", - "limit": "1.2 Mb" + "limit": "1.5 Mb" } ], "author": { diff --git a/rollup.config.js b/rollup.config.js index 3fb3617d76..4f7e97430c 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -33,9 +33,16 @@ 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 to generate types from js files. + }, + }, + include: ['src/**/*.ts+(|x)', '**/node_modules/**/*.js+(|x)'], }), terser(), ], diff --git a/tsconfig.json b/tsconfig.json index 6f32ad76e5..323278aeb9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -17,6 +17,5 @@ "baseUrl": "src", "resolveJsonModule": true }, - "include": ["src/**/*"], - "exclude": ["node_modules"] + "include": ["src/**/*"] }