From 572720753d9e3f5e3637be83fdfd8322d4a5af03 Mon Sep 17 00:00:00 2001 From: Phil Pluckthun Date: Fri, 30 Jan 2026 02:41:57 +0000 Subject: [PATCH] chore: Update rollup config to exclude sources from sourcemaps (#17) --- .changeset/social-knives-sort.md | 5 +++++ package.json | 1 - pnpm-lock.yaml | 14 -------------- scripts/rollup.config.mjs | 9 ++++++--- 4 files changed, 11 insertions(+), 18 deletions(-) create mode 100644 .changeset/social-knives-sort.md diff --git a/.changeset/social-knives-sort.md b/.changeset/social-knives-sort.md new file mode 100644 index 0000000..c18d4a3 --- /dev/null +++ b/.changeset/social-knives-sort.md @@ -0,0 +1,5 @@ +--- +'lan-network': patch +--- + +Update rollup config for reduced output and exclude sources from sourcemaps diff --git a/package.json b/package.json index 469814c..844f2f7 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,6 @@ "url": "https://github.com/kitten/lan-network/issues" }, "devDependencies": { - "@babel/plugin-transform-block-scoping": "^7.25.9", "@babel/plugin-transform-typescript": "^7.26.7", "@changesets/cli": "^2.29.6", "@changesets/get-github-info": "^0.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ea7b02b..fe892b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,9 +8,6 @@ importers: .: devDependencies: - '@babel/plugin-transform-block-scoping': - specifier: ^7.25.9 - version: 7.25.9(@babel/core@7.26.7) '@babel/plugin-transform-typescript': specifier: ^7.26.7 version: 7.26.7(@babel/core@7.26.7) @@ -190,12 +187,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.25.9': - resolution: {integrity: sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.26.7': resolution: {integrity: sha512-5cJurntg+AT+cgelGP9Bt788DKiAw9gIMSMU2NJrLAilnj0m8WZWUNZPSLOmadYsujHutpgElO+50foX+ib/Wg==} engines: {node: '>=6.9.0'} @@ -2230,11 +2221,6 @@ snapshots: '@babel/core': 7.26.7 '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.26.7)': - dependencies: - '@babel/core': 7.26.7 - '@babel/helper-plugin-utils': 7.26.5 - '@babel/plugin-transform-typescript@7.26.7(@babel/core@7.26.7)': dependencies: '@babel/core': 7.26.7 diff --git a/scripts/rollup.config.mjs b/scripts/rollup.config.mjs index e2d0777..4ddfa86 100644 --- a/scripts/rollup.config.mjs +++ b/scripts/rollup.config.mjs @@ -93,7 +93,7 @@ const commonOutput = { dir: './', exports: 'auto', sourcemap: true, - sourcemapExcludeSources: false, + sourcemapExcludeSources: true, hoistTransitiveImports: false, indent: false, freeze: false, @@ -186,6 +186,7 @@ const outputPlugins = [ keep_fnames: true, ie8: false, compress: { + passes: 2, pure_getters: true, toplevel: true, booleans_as_integers: false, @@ -197,6 +198,7 @@ const outputPlugins = [ loops: false, conditionals: false, join_vars: false, + reduce_vars: true, }, mangle: { module: true, @@ -222,8 +224,9 @@ export default [ exclude: 'node_modules/**', presets: [], plugins: [ - '@babel/plugin-transform-typescript', - '@babel/plugin-transform-block-scoping', + ['@babel/plugin-transform-typescript', { + optimizeConstEnums: true, + }], ], }), ], -- 2.51.2