chore: migrate to ESM (#303)
- [Why do I need `.js` extension?](https://stackoverflow.com/a/77150985/6512681) - [Why setting `rootDir` in the `tsconfig.json`?](https://stackoverflow.com/a/58941798/6512681) - [How to ensure that we add the `.js` extension via ESLint](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/extensions.md#importextensions) Fixes https://github.com/microsoft/playwright-mcp/issues/302
This commit is contained in:
@@ -16,14 +16,14 @@
|
||||
|
||||
import { program } from 'commander';
|
||||
|
||||
import { createServer } from './index';
|
||||
import { ServerList } from './server';
|
||||
import { createServer } from './index.js';
|
||||
import { ServerList } from './server.js';
|
||||
|
||||
import { startHttpTransport, startStdioTransport } from './transport';
|
||||
import { startHttpTransport, startStdioTransport } from './transport.js';
|
||||
|
||||
import { resolveConfig } from './config';
|
||||
import { resolveConfig } from './config.js';
|
||||
|
||||
const packageJSON = require('../package.json');
|
||||
import packageJSON from '../package.json' with { type: 'json' };
|
||||
|
||||
program
|
||||
.version('Version ' + packageJSON.version)
|
||||
|
||||
Reference in New Issue
Block a user