Skip to content

Commit 2ffe56a

Browse files
chore: clean up rollup config (#416)
Source maps were not provided for local builds. And a left out debug
1 parent 29fd602 commit 2ffe56a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
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: |

rollup.config.mjs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
/**
18+
* @fileoverview take from {@link https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/rollup.config.mjs | chromium-bidi}
19+
* and modified to specific requirement.
20+
*/
21+
1722
import path from 'node:path';
1823

1924
import commonjs from '@rollup/plugin-commonjs';
@@ -22,11 +27,14 @@ import {nodeResolve} from '@rollup/plugin-node-resolve';
2227
import cleanup from 'rollup-plugin-cleanup';
2328
import license from 'rollup-plugin-license';
2429

30+
const isProduction = process.env.NODE_ENV === 'production';
31+
32+
/** @type {import('rollup').RollupOptions} */
2533
const sdk = {
2634
input: './build/src/third_party/modelcontextprotocol-sdk/index.js',
2735
output: {
2836
file: './build/src/third_party/modelcontextprotocol-sdk/index.js',
29-
sourcemap: false,
37+
sourcemap: !isProduction,
3038
format: 'esm',
3139
},
3240
plugins: [
@@ -37,7 +45,6 @@ const sdk = {
3745
comments: [/Copyright/i],
3846
}),
3947
license({
40-
debug: true,
4148
thirdParty: {
4249
allow: {
4350
test: dependency => {

0 commit comments

Comments
 (0)