Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/layout",
"version": "2.0.0-beta.1",
"version": "2.0.0-beta.2",
"description": "graph layout algorithm",
"main": "dist/index.min.js",
"module": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const mainConfig = {
{
dir: 'lib',
format: 'esm',
sourcemap: true,
sourcemap: false,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Disabling sourcemaps for the ESM build (lib directory) will make it more difficult for developers using this library to debug issues, as they won't be able to step through the original TypeScript source code. It is highly recommended to keep sourcemaps enabled for library builds to improve the developer experience for consumers. The impact on final bundle size for end-users is typically negligible, as bundlers usually strip sourcemaps for production builds.

Suggested change
sourcemap: false,
sourcemap: true,

preserveModules: true,
preserveModulesRoot: 'src',
}
Expand All @@ -48,7 +48,7 @@ const workerESMConfig = {
output: {
file: 'lib/worker.js',
format: 'esm',
sourcemap: true,
sourcemap: false,
},
plugins: [
resolve(),
Expand Down