mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-18 16:34:27 -04:00
refactor: convert to proper esm / cjs hybrid package
This commit is contained in:
+5
-3
@@ -2,13 +2,15 @@
|
||||
"name": "revolt.js",
|
||||
"version": "7.0.0-beta.1",
|
||||
"main": "lib/cjs/index.js",
|
||||
"module": "src/index.ts",
|
||||
"module": "lib/esm/index.js",
|
||||
"types": "src/index.ts",
|
||||
"repository": "https://github.com/revoltchat/revolt.js",
|
||||
"author": "Paul Makles <insrt.uk>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc && tsc -p tsconfig.cjs.json",
|
||||
"build:esm": "tsc",
|
||||
"build:cjs": "tsc -p tsconfig.cjs.json",
|
||||
"build:watch": "tsc-watch --onSuccess \"node .\"",
|
||||
"lint": "eslint --ext .ts,.tsx src/",
|
||||
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
|
||||
@@ -31,7 +33,7 @@
|
||||
"isomorphic-ws": "^5.0.0",
|
||||
"long": "^5.2.1",
|
||||
"revolt-api": "^0.5.17",
|
||||
"solid-js": "^1.7.2",
|
||||
"solid-js": "^1.7.3",
|
||||
"typedoc": "^0.24.1",
|
||||
"ulid": "^2.3.0",
|
||||
"ws": "^8.13.0"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
"module": "commonjs",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"outDir": "./lib/cjs"
|
||||
}
|
||||
}
|
||||
+4
-3
@@ -1,11 +1,12 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es2016",
|
||||
"module": "commonjs",
|
||||
"target": "ES2022",
|
||||
"module": "ES6",
|
||||
"moduleResolution": "node",
|
||||
"rootDir": "./src",
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"outDir": "./lib/cjs",
|
||||
"outDir": "./lib/esm",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
|
||||
Reference in New Issue
Block a user