Updated the project to utilize ESM

This commit is contained in:
Kir_Antipov 2022-12-01 11:11:12 +00:00
parent 9ad1412834
commit e62b237642
2 changed files with 10 additions and 4 deletions

View file

@ -3,6 +3,7 @@
"version": "3.2.0", "version": "3.2.0",
"description": "GitHub Action that helps you publish your Minecraft mods", "description": "GitHub Action that helps you publish your Minecraft mods",
"main": "src/index.ts", "main": "src/index.ts",
"type": "module",
"scripts": { "scripts": {
"build": "ncc build --source-map --license license.txt && ncc run scripts/index.ts", "build": "ncc build --source-map --license license.txt && ncc run scripts/index.ts",
"test:lint": "eslint src/**/*.ts && eslint test/**/*.ts", "test:lint": "eslint src/**/*.ts && eslint test/**/*.ts",

View file

@ -2,11 +2,16 @@
"include": ["./src/**/*"], "include": ["./src/**/*"],
"exclude": ["node_modules", "./test/**/*"], "exclude": ["node_modules", "./test/**/*"],
"compilerOptions": { "compilerOptions": {
"target": "ES6", "target": "ESNext",
"esModuleInterop": true, "module": "ESNext",
"moduleResolution": "node", "moduleResolution": "node",
"esModuleInterop": true,
"baseUrl": "./src", "baseUrl": "./src",
"outDir": "./dist", "outDir": "./dist",
"resolveJsonModule": true,
"paths": {
"@/*": ["./*"],
}
}, },
} }