Skip to content

Commit

Permalink
Updated build for nextJS
Browse files Browse the repository at this point in the history
  • Loading branch information
dkildar committed May 28, 2024
1 parent 3f2b653 commit 826c968
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions lib/api/ecency-api/get-public-keys-query.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useQuery } from "@tanstack/react-query";
import {useQuery} from "@tanstack/react-query";
import axios from "axios";
import { useContext } from "react";
import { ChatContext } from "../../chat-context-provider";
import {useContext} from "react";
import {ChatContext} from "../../chat-context-provider";

export function useGetPublicKeysQuery(username?: string) {
const { privateApiHost } = useContext(ChatContext);
Expand Down
2 changes: 1 addition & 1 deletion lib/nostr/nostr-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { NostrContext } from "./nostr-context";

export const RELAYS: Record<string, { read: true; write: true }> = {
"wss://none.ecency.com": { read: true, write: true },
"wss://ntwo.ecency.com": { read: true, write: true }
"wss://ntwo.ecency.com": { read: true, write: true },
};

export function NostrProvider({ children }: PropsWithChildren<unknown>) {
Expand Down
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
"repository": "https://github.com/ecency/ns-query",
"author": "ildar.timerbaev <dkildar@gmail.com>",
"license": "MIT",
"main": "dist/index.js",
"main": "index.js",
"module": "dist/index.esm.js",
"exports": {
".": {
"import": "./dist/index.esm.js",
"require": "./dist/index.js"
}
},
"types": "dist/index.d.ts",
"files": [
"/dist"
Expand Down
4 changes: 3 additions & 1 deletion vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ import react from "@vitejs/plugin-react";
export default defineConfig({
build: {
target: ["es2015"],
sourcemap: true,
minify: false,
lib: {
entry: resolve(__dirname, "lib/index.ts"),
name: "dist",
fileName: "index",
formats: ["cjs"],
formats: ["esm", "cjs"],
},
rollupOptions: {
external: [
Expand Down

0 comments on commit 826c968

Please sign in to comment.