Skip to content

Commit 14620bc

Browse files
Fix package.json entry paths for npm publishing
- Update source package.json to point to dist/ entries (dist/index.js) - Keep dist/package.json with root entries (index.js) since it's published from dist/ - This resolves the module not found issue when installing via npm - The published package will have the correct entry points 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 77b2c30 commit 14620bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mcp-package/build.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,8 @@ console.log('✓ Created test.js');
149149
const packageSrc = join(__dirname, 'package.json');
150150
const packageContent = JSON.parse(readFileSync(packageSrc, 'utf8'));
151151

152-
// Update paths for distribution (remove dist/ prefix since files are at root)
152+
// Update paths for distribution
153+
// When published from dist/, these files become the package root
153154
packageContent.main = 'index.js';
154155
packageContent.bin = {
155156
'drupaltools-mcp': 'index.js'

mcp-package/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
"version": "1.0.0",
44
"description": "Model Context Protocol (MCP) server for discovering Drupal development tools, utilities, and plugins",
55
"type": "module",
6-
"main": "index.js",
6+
"main": "dist/index.js",
77
"bin": {
8-
"drupaltools-mcp": "index.js"
8+
"drupaltools-mcp": "dist/index.js"
99
},
1010
"files": [
11-
"dist/",
12-
"README.md"
11+
"dist/"
1312
],
1413
"scripts": {
1514
"build": "node build.js",

0 commit comments

Comments
 (0)