Skip to content

Commit 7ff27b0

Browse files
scalvertclaude
andcommitted
chore: switch to ESM-only build output
Remove CJS build format and update package configuration to be a pure ESM module. Update all export paths and bin entries from .mjs to .js extensions to match the new ESM-only output. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent ab25a52 commit 7ff27b0

4 files changed

Lines changed: 10 additions & 12 deletions

File tree

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,26 @@
2424
},
2525
"license": "MIT",
2626
"author": "Steve Calvert",
27+
"type": "module",
2728
"exports": {
2829
".": {
2930
"types": "./dist/index.d.ts",
30-
"import": "./dist/index.mjs",
31-
"require": "./dist/index.js"
31+
"import": "./dist/index.js"
3232
},
3333
"./adapters": {
3434
"types": "./dist/adapters-entry.d.ts",
35-
"import": "./dist/adapters-entry.mjs",
36-
"require": "./dist/adapters-entry.js"
35+
"import": "./dist/adapters-entry.js"
3736
},
3837
"./theme": {
3938
"types": "./dist/theme/index.d.ts",
40-
"import": "./dist/theme/index.mjs",
41-
"require": "./dist/theme/index.js"
39+
"import": "./dist/theme/index.js"
4240
}
4341
},
4442
"main": "./dist/index.js",
45-
"module": "./dist/index.mjs",
43+
"module": "./dist/index.js",
4644
"types": "./dist/index.d.ts",
4745
"bin": {
48-
"docusaurus-mcp-verify": "./dist/cli/verify.mjs"
46+
"docusaurus-mcp-verify": "./dist/cli/verify.js"
4947
},
5048
"files": [
5149
"dist"

scripts/test-mcp-server.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*/
88

99
import http from 'http';
10-
import { McpDocsServer } from '../dist/index.mjs';
11-
import { buildSearchIndex, exportSearchIndex } from '../dist/index.mjs';
10+
import { McpDocsServer } from '../dist/index.js';
11+
import { buildSearchIndex, exportSearchIndex } from '../dist/index.js';
1212

1313
const PORT = process.env.PORT || 3457;
1414

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
'theme/index': 'src/theme/index.ts',
88
'cli/verify': 'src/cli/verify.ts',
99
},
10-
format: ['cjs', 'esm'],
10+
format: ['esm'],
1111
dts: true,
1212
clean: true,
1313
sourcemap: true,

0 commit comments

Comments
 (0)