-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: react core build and move knockfeedcontainer (#10)
* feat: add build process to react-core and move KnockFeedContainer to react * rename component to NotificationFeedContainer * update peer dependency version minimums * add build:packages command
- Loading branch information
1 parent
64b7cd5
commit d8a216e
Showing
15 changed files
with
2,962 additions
and
2,429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@knocklabs/react-core": patch | ||
"@knocklabs/react": patch | ||
--- | ||
|
||
fix: react-core build process | ||
fix: remove headless prop from KnockFeedProvider | ||
fix: move KnockFeedContainer from react-core to react and rename to NotificationFeedContainer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
extends: ["@knocklabs/eslint-config/react-internal.js"], | ||
extends: [ | ||
"@knocklabs/eslint-config/library.js", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react-hooks/recommended",], | ||
parser: "@typescript-eslint/parser", | ||
parserOptions: { | ||
project: true, | ||
projects: ["tsconfig.json", "tsconfig.node.json"], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from "./KnockFeedProvider"; | ||
export * from "./KnockFeedContainer"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"extends": "@knocklabs/typescript-config/node.json", | ||
"include": ["vite.config.ts"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { defineConfig, LibraryFormats, loadEnv } from "vite"; | ||
import { resolve } from "path"; | ||
import react from "@vitejs/plugin-react"; | ||
import noBundlePlugin from "vite-plugin-no-bundle"; | ||
import dts from "vite-plugin-dts"; | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig(({ mode }) => { | ||
const env = loadEnv(mode, process.cwd(), ""); | ||
const CJS = env.BUILD_TARGET?.toLocaleLowerCase()?.match("cjs"); | ||
const formats: LibraryFormats[] = CJS ? ["cjs"] : ["es"]; | ||
|
||
return { | ||
plugins: [ | ||
dts({ | ||
outDir: "dist/types", | ||
}), | ||
react(), | ||
noBundlePlugin({ root: "./src" }), | ||
], | ||
build: { | ||
outDir: CJS ? "dist/cjs" : "dist/esm", | ||
sourcemap: true, | ||
lib: { | ||
entry: resolve(__dirname, "src/index.ts"), | ||
name: "react-core", | ||
formats, | ||
}, | ||
rollupOptions: { | ||
output: { | ||
interop: "compat", | ||
format: formats[0], | ||
}, | ||
// External packages that should not be bundled | ||
external: ["react"], | ||
}, | ||
}, | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...dules/feed/context/KnockFeedContainer.tsx → ...edContainer/NotificationFeedContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/react/src/modules/feed/components/NotificationFeedContainer/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./NotificationFeedContainer"; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
export * from "./components/EmptyFeed"; | ||
export * from "./components/NotificationCell"; | ||
export * from "./components/NotificationFeed"; | ||
export * from "./components/NotificationFeedContainer"; | ||
export * from "./components/NotificationFeedPopover"; | ||
export * from "./components/NotificationIconButton"; | ||
export * from "./components/UnseenBadge"; |
Oops, something went wrong.