Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

FDS-666 tree-shakable making flow tree shakable #267

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
tree-shakable vite config updated
vikas-cldcvr committed Apr 29, 2024
commit d322b1b22059d8e983bd1eedc8b740dc570410d6
16 changes: 15 additions & 1 deletion packages/flow-code-editor/vite.config.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,21 @@ export default defineConfig({
// If we want to publish standalone components we don't externalize lit,
// if you are going to use lit in your own project, you can make it a dep instead.
// external: /^lit/, <-- comment this line
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/, "monaco-editor"],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom",
"monaco-editor"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"
Original file line number Diff line number Diff line change
@@ -17,8 +17,8 @@ const sizes = ["medium", "small"] as const;

export type FBreadCrumbsProp = { tabIndex: number; title: string; icon?: string };
export type FBreadcrumbs = FBreadCrumbsProp[];
export type FBreadcrumbSize = (typeof sizes)[number];
export type FBreadcrumbVariant = (typeof variants)[number];
export type FBreadcrumbSize = typeof sizes[number];
export type FBreadcrumbVariant = typeof variants[number];

@flowElement("f-breadcrumb")
export class FBreadcrumb extends FRoot {
Original file line number Diff line number Diff line change
@@ -21,9 +21,9 @@ const variants = ["round", "curved", "block"] as const;
const categories = ["fill", "outline", "transparent", "packed"] as const;
const sizes = ["large", "medium", "small", "x-small"] as const;

export type FIconButtonVariant = (typeof variants)[number];
export type FIconButtonType = (typeof categories)[number];
export type FIconButtonSize = (typeof sizes)[number];
export type FIconButtonVariant = typeof variants[number];
export type FIconButtonType = typeof categories[number];
export type FIconButtonSize = typeof sizes[number];
export type FIconButtonState =
| "primary"
| "danger"
15 changes: 14 additions & 1 deletion packages/flow-form-builder/vite.config.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,20 @@ export default defineConfig({
formats: ["es", "cjs"]
},
rollupOptions: {
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/, "rxjs", "lodash-es"],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"
16 changes: 15 additions & 1 deletion packages/flow-lineage/vite.config.ts
Original file line number Diff line number Diff line change
@@ -13,7 +13,21 @@ export default defineConfig({
formats: ["es", "cjs"]
},
rollupOptions: {
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom",
"d3"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"
15 changes: 14 additions & 1 deletion packages/flow-log/vite.config.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,20 @@ export default defineConfig({
// If we want to publish standalone components we don't externalize lit,
// if you are going to use lit in your own project, you can make it a dep instead.
// external: /^lit/, <-- comment this line
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/, "mark.js"],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"
17 changes: 16 additions & 1 deletion packages/flow-md-editor/vite.config.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,22 @@ export default defineConfig({
// If we want to publish standalone components we don't externalize lit,
// if you are going to use lit in your own project, you can make it a dep instead.
// external: /^lit/, <-- comment this line
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/, "monaco-editor"],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom",
"monaco-editor",
"showdown"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"
15 changes: 14 additions & 1 deletion packages/flow-table/vite.config.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,20 @@ export default defineConfig({
// If we want to publish standalone components we don't externalize lit,
// if you are going to use lit in your own project, you can make it a dep instead.
// external: /^lit/, <-- comment this line
external: ["@ollion/flow-core-config", "@ollion/flow-core", /^lit/],
external: [
/^@ollion/,
"axios",
"emoji-mart",
"lodash-es",
/^lit/,
"rxjs",
"vanilla-colorful",
"mark.js",
"@emoji-mart/data",
"@lit-labs/virtualizer",
"flatpickr",
"@floating-ui/dom"
],
output: {
globals: {
"@ollion/flow-core": "@ollion/flow-core"