Skip to content

Chrome DevTools for coding agents

chore: clean up rollup config (#416)

Nikolay Vitkov2ffe56a1a592
diff --git a/.github/workflows/publish-to-npm-on-tag.yml b/.github/workflows/publish-to-npm-on-tag.yml
index 1e8ec6ef..007474e8 100644
--- a/.github/workflows/publish-to-npm-on-tag.yml
+++ b/.github/workflows/publish-to-npm-on-tag.yml
@@ -45,6 +45,8 @@ jobs:
- name: Build
run: npm run build
+ env:
+ NODE_ENV: 'production'
- name: Publish
run: |
@@ -76,6 +78,8 @@ jobs:
- name: Build
run: npm run build
+ env:
+ NODE_ENV: 'production'
- name: Install MCP Publisher
run: |
diff --git a/rollup.config.mjs b/rollup.config.mjs
index 554c26cd..b03ee276 100644
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -14,6 +14,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+/**
+ * @fileoverview take from {@link https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/rollup.config.mjs | chromium-bidi}
+ * and modified to specific requirement.
+ */
+
import path from 'node:path';
import commonjs from '@rollup/plugin-commonjs';
@@ -22,11 +27,14 @@ import {nodeResolve} from '@rollup/plugin-node-resolve';
import cleanup from 'rollup-plugin-cleanup';
import license from 'rollup-plugin-license';
+const isProduction = process.env.NODE_ENV === 'production';
+
+/** @type {import('rollup').RollupOptions} */
const sdk = {
input: './build/src/third_party/modelcontextprotocol-sdk/index.js',
output: {
file: './build/src/third_party/modelcontextprotocol-sdk/index.js',
- sourcemap: false,
+ sourcemap: !isProduction,
format: 'esm',
},
plugins: [
@@ -37,7 +45,6 @@ const sdk = {
comments: [/Copyright/i],
}),
license({
- debug: true,
thirdParty: {
allow: {
test: dependency => {