Skip to content

Commit 500e161

Browse files
chore: clean up rollup config
1 parent 29fd602 commit 500e161

File tree

4 files changed

+12
-89
lines changed

4 files changed

+12
-89
lines changed

.github/workflows/publish-to-npm-on-tag.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545

4646
- name: Build
4747
run: npm run build
48+
env:
49+
NODE_ENV: 'production'
4850

4951
- name: Publish
5052
run: |
@@ -76,6 +78,8 @@ jobs:
7678

7779
- name: Build
7880
run: npm run build
81+
env:
82+
NODE_ENV: 'production'
7983

8084
- name: Install MCP Publisher
8185
run: |

package-lock.json

Lines changed: 0 additions & 67 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
"devDependencies": {
4747
"@eslint/js": "^9.35.0",
4848
"@modelcontextprotocol/sdk": "1.20.0",
49-
"@rollup/plugin-commonjs": "^28.0.8",
50-
"@rollup/plugin-json": "^6.1.0",
5149
"@rollup/plugin-node-resolve": "^16.0.3",
5250
"@stylistic/eslint-plugin": "^5.4.0",
5351
"@types/debug": "^4.1.12",

rollup.config.mjs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,23 @@
11
/**
2-
* Copyright 2021 Google LLC.
3-
* Copyright (c) Microsoft Corporation.
4-
*
5-
* Licensed under the Apache License, Version 2.0 (the "License");
6-
* you may not use this file except in compliance with the License.
7-
* You may obtain a copy of the License at
8-
*
9-
* http://www.apache.org/licenses/LICENSE-2.0
10-
*
11-
* Unless required by applicable law or agreed to in writing, software
12-
* distributed under the License is distributed on an "AS IS" BASIS,
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14-
* See the License for the specific language governing permissions and
15-
* limitations under the License.
2+
* @license
3+
* Copyright 2025 Google Inc.
4+
* SPDX-License-Identifier: Apache-2.0
165
*/
6+
177
import path from 'node:path';
188

19-
import commonjs from '@rollup/plugin-commonjs';
20-
import json from '@rollup/plugin-json';
219
import {nodeResolve} from '@rollup/plugin-node-resolve';
2210
import cleanup from 'rollup-plugin-cleanup';
2311
import license from 'rollup-plugin-license';
2412

13+
const isProduction = process.env.NODE_ENV === 'production';
14+
15+
/** @type {import('rollup').RollupOptions} */
2516
const sdk = {
2617
input: './build/src/third_party/modelcontextprotocol-sdk/index.js',
2718
output: {
2819
file: './build/src/third_party/modelcontextprotocol-sdk/index.js',
29-
sourcemap: false,
20+
sourcemap: !isProduction,
3021
format: 'esm',
3122
},
3223
plugins: [
@@ -37,7 +28,6 @@ const sdk = {
3728
comments: [/Copyright/i],
3829
}),
3930
license({
40-
debug: true,
4131
thirdParty: {
4232
allow: {
4333
test: dependency => {
@@ -79,8 +69,6 @@ const sdk = {
7969
},
8070
},
8171
}),
82-
commonjs(),
83-
json(),
8472
nodeResolve(),
8573
],
8674
};

0 commit comments

Comments
 (0)