diff --git a/jest.config.js b/jest.config.js index 8cbf894..e946bca 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,5 +1,5 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ -module.exports = { +export default { preset: 'ts-jest', testEnvironment: 'node', }; \ No newline at end of file diff --git a/package.json b/package.json index e481bf5..9b64eea 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "3.0.0", "description": "A Node.js interface to the Snowball stemming algorithms", "main": "lib/index.js", + "type": "module", "scripts": { "test": "jest", "build": "tsc" diff --git a/tsconfig.json b/tsconfig.json index daa4a77..4a98bed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,12 @@ { "compilerOptions": { "target": "es2022", - "module": "commonjs", + "module": "esnext", "declaration": true, "outDir": "./lib", - "strict": true + "strict": true, + "moduleResolution": "node", + "esModuleInterop": true }, "include": ["src"], "exclude": ["node_modules", "**/__tests__/*"]