package.json: declare side-effects free

This commit is contained in:
Paul Miller 2023-07-12 18:26:12 +00:00
parent 3f0c0b59f1
commit 549e286ef0
No known key found for this signature in database
GPG Key ID: 697079DA6878B89B
4 changed files with 47 additions and 41 deletions

@ -1,7 +1,4 @@
{ {
"type": "module", "type": "module",
"browser": { "sideEffects": false
"crypto": false,
"./crypto": "./esm/crypto.js"
}
} }

@ -37,6 +37,7 @@
"prettier": "2.8.4", "prettier": "2.8.4",
"typescript": "5.0.2" "typescript": "5.0.2"
}, },
"sideEffects": false,
"main": "index.js", "main": "index.js",
"exports": { "exports": {
".": { ".": {

@ -1,20 +1,24 @@
{ {
"compilerOptions": { "compilerOptions": {
"strict": true,
"outDir": "esm", "outDir": "esm",
"target": "es2020", "target": "es2020",
"module": "es6", "module": "es6",
"moduleResolution": "node16", "moduleResolution": "node16",
"noUnusedLocals": true,
"sourceMap": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@noble/hashes/crypto": [ "src/crypto" ] "@noble/hashes/crypto": ["src/crypto"]
}, },
"sourceMap": true,
"strict": true,
"allowSyntheticDefaultImports": false,
"allowUnreachableCode": false,
"esModuleInterop": false,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": false,
"noUnusedLocals": true,
"noUnusedParameters": true,
}, },
"include": ["src"], "include": ["src"],
"exclude": [ "exclude": ["node_modules", "lib"]
"node_modules",
"lib",
],
} }

@ -1,20 +1,24 @@
{ {
"compilerOptions": { "compilerOptions": {
"strict": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"outDir": ".", "outDir": ".",
"target": "es2020", "target": "es2020",
"lib": ["es2020"], // Set explicitly to remove DOM "lib": ["es2020"], // Set explicitly to remove DOM
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
"noUnusedLocals": true,
"baseUrl": ".", "baseUrl": ".",
"sourceMap": true,
"declaration": true,
"declarationMap": true,
"strict": true,
"allowSyntheticDefaultImports": false,
"allowUnreachableCode": false,
"esModuleInterop": false,
"noFallthroughCasesInSwitch": true,
"noImplicitReturns": true,
"noUncheckedIndexedAccess": false,
"noUnusedLocals": true,
"noUnusedParameters": true
}, },
"include": ["src"], "include": ["src"],
"exclude": [ "exclude": ["node_modules", "*.d.ts"]
"node_modules",
"*.d.ts"
],
} }