Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@
"y-partykit": "^0.0.33",
"yjs": "^13.6.27"
}
}
}
28 changes: 20 additions & 8 deletions packages/ariakit/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,26 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react/jsx-runtime",
],
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
31 changes: 18 additions & 13 deletions packages/code-block/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { defineConfig } from "vite";
import pkg from "./package.json";
// import eslintPlugin from "vite-plugin-eslint";

const deps = Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
});


// https://vitejs.dev/config/
export default defineConfig((conf) => ({
Expand Down Expand Up @@ -41,16 +37,25 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: (source: string) => {
if (deps.includes(source)) {
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}

if (source.startsWith("@shikijs/")) {
return true;
}

return false;
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
Expand Down
20 changes: 15 additions & 5 deletions packages/core/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineConfig } from "vitest/config";
import pkg from "./package.json";
// import eslintPlugin from "vite-plugin-eslint";

const deps = Object.keys(pkg.dependencies);


// https://vitejs.dev/config/
export default defineConfig({
Expand Down Expand Up @@ -32,14 +32,24 @@ export default defineConfig({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: (source: string) => {
if (deps.includes(source)) {
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@shikijs/lang") ||
source.startsWith("@shikijs/theme")
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
Expand Down
28 changes: 20 additions & 8 deletions packages/mantine/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,26 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react/jsx-runtime",
],
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
21 changes: 10 additions & 11 deletions packages/react/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,22 @@ export default defineConfig((conf) => ({
// into your library
external: (source) => {
if (
[
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react-dom/client",
"react/jsx-runtime",
].includes(source)
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}

return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/")
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
Expand Down
35 changes: 21 additions & 14 deletions packages/server-util/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ import { defineConfig } from "vite";
import pkg from "./package.json";
// import eslintPlugin from "vite-plugin-eslint";

const deps = Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
});


// https://vitejs.dev/config/
export default defineConfig((conf) => ({
Expand Down Expand Up @@ -41,15 +37,26 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react-dom/client",
"react/jsx-runtime",
],
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
28 changes: 20 additions & 8 deletions packages/shadcn/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,26 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react/jsx-runtime",
],
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
29 changes: 20 additions & 9 deletions packages/xl-ai-server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,26 @@ export default defineConfig((conf) => ({
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: [
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"node:fs",
"node:http2",
],
external: (source) => {
if (
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}
return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
// Provide global variables to use in the UMD build
// for externalized deps
Expand Down
21 changes: 10 additions & 11 deletions packages/xl-ai/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,22 @@ export default defineConfig((conf) => ({
// into your library
external: (source) => {
if (
[
...Object.keys({
...pkg.dependencies,
...pkg.peerDependencies,
...pkg.devDependencies,
}),
"react-dom/client",
"react/jsx-runtime",
].includes(source)
Object.keys({
...pkg.dependencies,
...((pkg as any).peerDependencies || {}),
...pkg.devDependencies,
}).includes(source)
) {
return true;
}

return (
source.startsWith("react/") ||
source.startsWith("react-dom/") ||
source.startsWith("prosemirror-") ||
source.startsWith("@tiptap/") ||
source.startsWith("@blocknote/")
source.startsWith("@blocknote/") ||
source.startsWith("@shikijs/") ||
source.startsWith("node:")
);
},
output: {
Expand Down
Loading
Loading