lexical icon indicating copy to clipboard operation
lexical copied to clipboard

Feature: Example of Vite config to fully bundle lexical+plugins+react into a JS and a CSS file

Open vadimkantorov opened this issue 1 year ago • 16 comments

I'm developing a single-file HTML app (for ease of distribution and drop-in) which needs a rich-text editor. I'm currently using Lexical for this purpose.

Extracting one of asks from https://github.com/facebook/lexical/issues/5840, for non-webdevs like me, it would be greate to have an example of Vite config bundling Lexical+Plugins+React into:

  1. one JS and one CSS file - e.g. for deployment to GitHub pages (the existing vite config produces many CSS/font/image/JS files)
  2. the JS/CSS should be fully embeddable in <script>...</script> and <style>...</style> and it should be possible to somehow register a Promise to be triggered when initialization of the editor completes (and ideally also a synchronous initialization should be supported)

Am I correct that (1) should already be achievable in https://vitejs.dev/guide/build#library-mode ?

vadimkantorov avatar May 26 '24 11:05 vadimkantorov

This is more of a vite question than anything else. Initialization of the editor is synchronous, no promises are involved unless one of the plug-ins is doing something async (but there isn't a general way to determine that).

etrepum avatar May 26 '24 15:05 etrepum

I'll try to come up with such a config (or patch to the default config), but as long as it can fulfill (1), it can become also a Lexical distribution option and feature (e.g. bundled core and all Lexical plugins available in the lexical repo), similar to Quill

vadimkantorov avatar May 26 '24 20:05 vadimkantorov

So I modified the vite.prod.config.js to be like (full example in https://github.com/vadimkantorov/lexical-playground-only):

 rollupOptions: {
      input: {
        main: new URL('./index.html', import.meta.url).pathname,

      },

      output: {
            format: 'es',
            manualChunks: false,
            inlineDynamicImports: true,
            entryFileNames: '[name].js',   // currently does not work for the legacy bundle
            assetFileNames: '[name].[ext]', // currently does not work for images
      },

    },

This produces main.js, main.css, landscape.jpg, yellow-flower.jpg, cat-typing.gif and a bunch of svg/woff/woff2/ttf files.

To embed the svg/woff/woff2/ttf into the CSS I wrote a following embedder:

# dataurifycss.py
# python dataurifycss.py assets/main.css

import os, sys, re, base64
mime = {'.svg': 'image/svg+xml', '.jpg': 'image/jpeg', '.png': 'image/png', '.gif': 'image/gif', '.woff2': 'font/woff2', '.woff': 'font/woff', '.ttf': 'font/ttf'}
with open(sys.argv[1], 'w') as f: css = f.read()
root_dir = os.path.dirname(sys.argv[1])
seen = set()
def dataurify(s):
    o = s.group(0)
    g = s.group(1).strip("'" + '"')
    e = os.path.splitext(g)[-1]
    p = os.path.join(root_dir, g.lstrip('/')) if g.startswith('/') else g
    if g.startswith('data:'):
        return g
    elif e in mime:
        t = 'url(data:{mime};base64,{encoded})'.format(mime = mime[e], encoded = base64.b64encode(open(p, 'rb').read()).decode())
        seen.add(p)
        return t
    else:
        return o
pattern = 'url\((.+?)\)'
res = re.sub(pattern, dataurify, css)
for p in seen: os.remove(p)
with open(sys.argv[1], 'w') as f: f.write(res)
# dataurifyjs.py
# python dataurifyjs.py assets/main.js

import os, sys, re, base64
mime = {'.jpg': 'image/jpeg', '.png': 'image/png', '.gif': 'image/gif'}
with open(sys.argv[1], 'r') as f: css = f.read()
root_dir = os.path.dirname(sys.argv[1])
seen = set()
def dataurify(s):
    o = s.group(0)
    g = s.group(1).strip("'" + '"')
    e = os.path.splitext(g)[-1]
    p = os.path.join(root_dir, g.lstrip('/')) if g.startswith('/') else g
    if g.startswith('data:'):
        return g
    elif e in mime:
        t = '"data:{mime};base64,{encoded}"'.format(mime = mime[e], encoded = base64.b64encode(open(p, 'rb').read()).decode())
        seen.add(p)
        return t
    else:
        return o
pattern = '"(/.+?\.(' + '|'.join(ext.lstrip('.') for ext in mime) + '))"'
res = re.sub(pattern, dataurify, css)
for p in seen: os.remove(p)
with open(sys.argv[1], 'w') as f: f.write(res)

The JPG and GIF files can be embedded in a similar way with dataurifyjs.py, which gives self-contained main.js and main.css files

So I would propose:

  1. to somehow fix the usage of JPG/GIF files to be also in CSS (currently they are used in main.js as var landscapeImage = "/landscape.jpg";/var yellowFlowerImage = "/yellow-flower.jpg";/var catTypingGif = "/cat-typing.gif";) and have an option/explainer to remove these examples files. They are quite heavy and increase the size of the JS if embedded.
  2. and maybe include in README or in repo/examples a kind of vite.prod.config.js to have such a target that produces only a main.js/main.css with all images/fonts embedded. If vite doesn't have such image/font embedder, maybe this can also be done with a JavaScript snippet similar to my Python snippets - and then this snippet can be added in vite.prod.config.js

vadimkantorov avatar May 27 '24 01:05 vadimkantorov

Vite does inlining when it makes sense (<4kb), at least in situations when you are using it for resolution of the asset (imported from js or using relative paths in css). You can configure it to behave differently https://vitejs.dev/config/build-options.html#build-assetsinlinelimit

I don't think it's a terribly common use case to want to inline everything into a pair of CSS and JS files. It's not very clear what the use case would be where you could use two files, but not a directory with more than two files.

If everything is all bundled up, how would you propose that the editor remains extensible? Lexical is an extensible framework for building text editors, not a specific text editor. It's unclear what you would do with an "drop-in" playground editor that is built for demonstration purposes and doesn't really have infrastructure for serialization/deserialization or configuration.

etrepum avatar May 27 '24 16:05 etrepum

I think, a single or a pair of CSS/JS with some preset amount of plugins make a great starting point for non-webdevs (like machine learning devs) who just need a markdown/rtf editor as part of a small hack. In this usecase, Lexical + plugins should just provide their APIs, but adding of a new plugin at runtime is a non-goal

I think it's fair to say that when extensibility becomes needed, that user can invest some time in learning react/npm/vite etc. So not allowing extensibility in the two-files-distribution is okay and allows to try out and already use this modern editor with good markdown support out of the box.

vadimkantorov avatar May 27 '24 17:05 vadimkantorov

What would be the goals of getting this into the Lexical distribution, rather than having a standalone project with a very clear purpose? I think that even if Lexical provided this example, it would not be very easy to find or use, because the vast majority of Lexical's resources are dedicated to the more general use case.

Perhaps a purpose-built editor that depends on Lexical, but not part of the Lexical distribution, currently makes more sense for your purposes? For example, https://mdxeditor.dev/ is based on Lexical and its usage and documentation are all very focused on the markdown editor use case, and because it takes a stance on framework/asset/CSS management it can include UI components much more easily than the Lexical distribution.

etrepum avatar May 27 '24 18:05 etrepum

  • I'm not saying that this should be in the main Lexical repo per se, but having a release variant like e.g. tarball with lexical-batteriesincluded-rtf-editor.js with lexical-batteriesincluded-rtf-editor.css would be very nice for small hacks/tryouts for non-web developers (for who RTF/Markdown functionality in existing Lexical Playground is sufficient), for who grokking react/npm/rollup/es/umd etc is a considerable investment. This usecase would enable hacks in a plain html file locally, trying things out even without a web server

  • I agree that placing sth like this "not part of Lexical distribution" is fine as well, but ideally I'd like to have this auto-released along with Lexical releases, given how actively Lexical is developed. Such a package can be extremely is minimal (e.g. making Playground's CSS not style global elements like <header> and providing only a few API methods like getText/setText/getMarkdown/setMarkdown) and thus not require any separate testing (apart from Lexical's) or other people's regular effort to follow Lexical's release cadence.

  • https://mdxeditor.dev seems exteremely awesome and maybe I'll use it as well. I hope some its plugins/inmprovements related to Markdown support be upstreamed as well


Basically my ask was providing some automated releases with limited functionality for non-web developers (like myself) who do not need extensibility, but rather would appreciate an option with very simple <script src=""> import for having a fully-functional basic RTF editor supporting Markdown, non requiring to learn/install react to have something minimally working in the browser. If such a hack evolves and such a user needs more flexibility/UI complexity, surely they would migrate to a full React-based offering.

vadimkantorov avatar May 28 '24 13:05 vadimkantorov

Upgrading to release v0.16.0 broke my editor: (not minified) main.js increased in size from 12Mb to 26Mb (for producing a single main.js output I'm doing in rollupOptions: output: { format: 'iife',/*'es',*/ compact: false, manualChunks: false, inlineDynamicImports: true, entryFileNames: '[name].js', /* currently does not work for the legacy bundle*/ assetFileNames: '[name].[ext]',} in packages/lexical-playground/vite.prod.config.ts

Also, ActionsPlugin now at loading produces the error (at release 0.12.5 there was no such error):

main.js:9173 Error: Missing FlashMessageContext
    at useFlashMessageContext (main.js:33801:13)
    at useFlashMessage (main.js:33806:12)
    at ActionsPlugin (main.js:63984:30)
    at Nh (main.js:8630:10)
    at Vk (main.js:11804:14)
    at Uk (main.js:11471:14)
    at Tk (main.js:11464:7)
    at Ik (main.js:11447:9)
    at Nk (main.js:11163:10)
    at Gk (main.js:11094:60)

(I'm doing minify: false but I still could not figure out how to disable obfuscation/minification completely)

 const useFlashMessageContext = ()=>{
        const ctx = reactExports.useContext(Context$1);
        if (!ctx) {
            throw new Error("Missing FlashMessageContext");
        }
        return ctx;
    }
    ;

Would you have a suggestion on how to fix this FlashMessageContext thing? Thanks!

vadimkantorov avatar Jun 09 '24 16:06 vadimkantorov

Hard to say without being able to see the project but doubling of size makes it seem like you're including multiple versions of dependencies which will cause all sorts of problems. ActionsPlugin isn't something that's exported from any public lexical package so whatever broke there is in your project.

etrepum avatar Jun 09 '24 16:06 etrepum

@etrepum My project is a simplified version of App.tsx from playground. I just fixed this problem by adding import {FlashMessageContext} from './context/FlashMessageContext'; and inserting a FlashMessageContext inside a LexicalComposer. I think in recent version ActionPlugin refuses to load if it cannot find an existing FlashMessageContext

vadimkantorov avatar Jun 09 '24 16:06 vadimkantorov

Coming back to getting a single main.js file, currently when using output: { format: 'iife',/*'es',*/ compact: false, manualChunks: false, inlineDynamicImports: true, entryFileNames: '[name].js', /* currently does not work for the legacy bundle*/ assetFileNames: '[name].[ext]', } produces the following build/assets directory listing:

KaTeX_AMS-Regular.ttf
KaTeX_AMS-Regular.woff
KaTeX_AMS-Regular.woff2
KaTeX_Caligraphic-Bold.ttf
KaTeX_Caligraphic-Bold.woff
KaTeX_Caligraphic-Bold.woff2
KaTeX_Caligraphic-Regular.ttf
KaTeX_Caligraphic-Regular.woff
KaTeX_Caligraphic-Regular.woff2
KaTeX_Fraktur-Bold.ttf
KaTeX_Fraktur-Bold.woff
KaTeX_Fraktur-Bold.woff2
KaTeX_Fraktur-Regular.ttf
KaTeX_Fraktur-Regular.woff
KaTeX_Fraktur-Regular.woff2
KaTeX_Main-Bold.ttf
KaTeX_Main-Bold.woff
KaTeX_Main-Bold.woff2
KaTeX_Main-BoldItalic.ttf
KaTeX_Main-BoldItalic.woff
KaTeX_Main-BoldItalic.woff2
KaTeX_Main-Italic.ttf
KaTeX_Main-Italic.woff
KaTeX_Main-Italic.woff2
KaTeX_Main-Regular.ttf
KaTeX_Main-Regular.woff
KaTeX_Main-Regular.woff2
KaTeX_Math-BoldItalic.ttf
KaTeX_Math-BoldItalic.woff
KaTeX_Math-BoldItalic.woff2
KaTeX_Math-Italic.ttf
KaTeX_Math-Italic.woff
KaTeX_Math-Italic.woff2
KaTeX_SansSerif-Bold.ttf
KaTeX_SansSerif-Bold.woff
KaTeX_SansSerif-Bold.woff2
KaTeX_SansSerif-Italic.ttf
KaTeX_SansSerif-Italic.woff
KaTeX_SansSerif-Italic.woff2
KaTeX_SansSerif-Regular.ttf
KaTeX_SansSerif-Regular.woff
KaTeX_SansSerif-Regular.woff2
KaTeX_Script-Regular.ttf
KaTeX_Script-Regular.woff
KaTeX_Script-Regular.woff2
KaTeX_Size1-Regular.ttf
KaTeX_Size1-Regular.woff
KaTeX_Size1-Regular.woff2
KaTeX_Size2-Regular.ttf
KaTeX_Size2-Regular.woff
KaTeX_Size2-Regular.woff2
KaTeX_Size3-Regular.ttf
KaTeX_Size3-Regular.woff
KaTeX_Size4-Regular.ttf
KaTeX_Size4-Regular.woff
KaTeX_Size4-Regular.woff2
KaTeX_Typewriter-Regular.ttf
KaTeX_Typewriter-Regular.woff
KaTeX_Typewriter-Regular.woff2
apple-touch-icon.png
cat-typing.gif
esm/index.html
esm/index.mjs
esm/prepopulatedRichText.mjs
esm/styles.css
favicon-16x16.png
favicon-32x32.png
favicon.ico
index.html
landscape.jpg
main.js
yellow-flower.jpg

All svg menu images in 0.16.0 are now embedded in main.js by default (was not the case in 0.12.5)

Could you recommend any options for rollup/vite to make embed these KaTeX fonts into main.js?

Also, somehow unminified main.js size (practically it's just lexical-playground) rose from 8Mb to 24Mb when updated from release 0.12.5 to 0.16.0.

Or could I now use esm/index.mjs/esm/styles.css for this purpose?

vadimkantorov avatar Jun 09 '24 16:06 vadimkantorov

Looking at the playground it seems that most of the build size comes from excalidraw

$ find packages/lexical-playground/build -name "*.js"|xargs du -hc
4.0K    packages/lexical-playground/build/assets/ImageResizer-BOglis69.js
4.0K    packages/lexical-playground/build/assets/EquationComponent-0rKEFys_.js
152K    packages/lexical-playground/build/assets/parser-html-C9wyCVVk.js
1.3M    packages/lexical-playground/build/assets/main-Cx1fdMhU.js
4.0K    packages/lexical-playground/build/assets/PollComponent-CB4jlrjq.js
4.0K    packages/lexical-playground/build/assets/LexicalNestedComposer-fvfXQv0w.js
152K    packages/lexical-playground/build/assets/parser-postcss-DWk0NhTE.js
4.0K    packages/lexical-playground/build/assets/StickyComponent-Cz0oLPVj.js
4.0K    packages/lexical-playground/build/assets/ImageComponent-RRTY-P5X.js
432K    packages/lexical-playground/build/assets/standalone-CukwHxG0.js
160K    packages/lexical-playground/build/assets/parser-markdown-C4fzb1xR.js
 20M    packages/lexical-playground/build/assets/ExcalidrawComponent-X4FaPXXk.js
308K    packages/lexical-playground/build/assets/parser-babel-U9l6AbUH.js
4.0K    packages/lexical-playground/build/assets/InlineImageComponent-B4WSWRO-.js
 22M    total

Beyond that you're really just using code in an unsupported way. The playground is all demo code built with lexical's build infrastructure, it's not designed to be easily extractable into a standalone project.

The esm folder is not relevant to what you're trying to do, it's basically just a demo that lexical can be used without a bundler at all. https://playground.lexical.dev/esm/

etrepum avatar Jun 09 '24 19:06 etrepum

I made a cleaner extraction of lexical-playground: https://github.com/vadimkantorov/moncms

It contains packages/lexical-playground and packages/shared, without any modifications, from lexical 0.16.0. The only needed patch is to packages/lexical-playground/vite.prod.config.ts and specified in https://github.com/vadimkantorov/moncms/blob/gh-pages/Makefile#L46-L56

You can find the produced main.js ( 26 megabytes :( ) in https://github.com/vadimkantorov/moncms/raw/gh-pages/assets/main.js . The build dir produced by Makefile in fact contains only main.js and no other js files that you listed above (probably I don't have them because of rollup's output options I used in Makefile)

The root tsx file is https://github.com/vadimkantorov/moncms/blob/gh-pages/indexEditorOnly.tsx (modified merger of packages/lexical-playground/src/index.tsx and packages/lexical-playground/src/Editor.tsx)

So far problems with this approach:

  • I think there were some errors if I did not clone packages/shared, but I'll try again to get rid of it
  • main.js is extremely large: 26 megabytes (with disabled minification, but still)

Attaching the build artifacts (produced by https://github.com/vadimkantorov/moncms/blob/gh-pages/.github/workflows/build.yml): lexicalplaygroundonlyassets (15).zip

vadimkantorov avatar Jun 10 '24 12:06 vadimkantorov

Would anyone have suggestions why the produced main javascript file of the playground takes > 20 megabytes of space? (even with inclusion of all the fancy real-time collaboration, syntax highlighting and other plugins this looks like a lot, no?)

vadimkantorov avatar Feb 13 '25 22:02 vadimkantorov

I tried using vite-plugin-singlefile to build-bundle all of playground in a single file (added on top of packages/lexical-playground/vite.prod.config.ts import { viteSingleFile } from "vite-plugin-singlefile", then commented out split: new URL('./split/index.html', import.meta.url).pathname, and added viteSingleFile() to the end of the plugins : [...] list), and it mostly worked:

The full file listing in the flyout below.

There are some follow-up issues:

  • ExcaliDraw embedding/inlining did not work and it leaves around a bunch of fonts and javascript assets along with a super-heavy ./excalidraw-assets-dev/vendor-*.js file. Would you have any recommendations on how to inline these as well?
  • ./esm/ directory output seems broken, as not ./dist/ files are in the build output. It appears that the same is true for non-singlefile build. Should somehow the build config drop esm copy-over? Or in reverse, make sure that ./dist/ files are copied over? Or where to get them (./dist/Lexical.mjs, ./dist/LexicalClipboard.mjs, ./dist/LexicalDragon.mjs, ./dist/LexicalHistory.mjs, ./dist/LexicalHtml.mjs, ./dist/LexicalRichText.mjs, ./dist/LexicalSelection.mjs, ./dist/LexicalUtils.mjs)?

Thank you!

$ find -printf "%k KB %p\n"

4 KB ./apple-touch-icon-x_S7F3sI.png
4 KB ./apple-touch-icon.png
0 KB ./esm
4 KB ./esm/index.html
4 KB ./esm/index.mjs
4 KB ./esm/prepopulatedRichText.mjs
1 KB ./esm/styles.css
0 KB ./excalidraw-assets
20 KB ./excalidraw-assets/Assistant-Bold.woff2
20 KB ./excalidraw-assets/Assistant-Medium.woff2
20 KB ./excalidraw-assets/Assistant-Regular.woff2
20 KB ./excalidraw-assets/Assistant-SemiBold.woff2
88 KB ./excalidraw-assets/Cascadia.woff2
0 KB ./excalidraw-assets/locales
28 KB ./excalidraw-assets/locales/ar-SA-json-db7c644ccbeb85d54a47.js
12 KB ./excalidraw-assets/locales/az-AZ-json-08a6de50238dbb21926c.js
24 KB ./excalidraw-assets/locales/bg-BG-json-42fb0378311f3ade2627.js
24 KB ./excalidraw-assets/locales/bn-BD-json-9ad9e5ae95c4c66297b1.js
20 KB ./excalidraw-assets/locales/ca-ES-json-a6b2c18f7e85cfd11599.js
20 KB ./excalidraw-assets/locales/cs-CZ-json-ea03835d73f9b921f7c4.js
12 KB ./excalidraw-assets/locales/da-DK-json-a94944ac6fa9756d2fac.js
24 KB ./excalidraw-assets/locales/de-DE-json-d82053ab52357510811b.js
32 KB ./excalidraw-assets/locales/el-GR-json-4cbc2dbda5a5df636ee1.js
24 KB ./excalidraw-assets/locales/es-ES-json-7afb66536ee40d852fa2.js
24 KB ./excalidraw-assets/locales/eu-ES-json-671a4afcfce7b0a7660b.js
24 KB ./excalidraw-assets/locales/fa-IR-json-76b039039b043cc4280c.js
20 KB ./excalidraw-assets/locales/fi-FI-json-64c8902f10425e1b2e81.js
24 KB ./excalidraw-assets/locales/fr-FR-json-d16a471290ba26a6c66a.js
20 KB ./excalidraw-assets/locales/gl-ES-json-d11c7966c3c2f95756e0.js
20 KB ./excalidraw-assets/locales/he-IL-json-a7bc2a673875b2e655e1.js
32 KB ./excalidraw-assets/locales/hi-IN-json-4947c9dace32cc3c6eef.js
20 KB ./excalidraw-assets/locales/hu-HU-json-0419027d32efac73d518.js
20 KB ./excalidraw-assets/locales/id-ID-json-6542dd92ab54a2c1c48e.js
24 KB ./excalidraw-assets/locales/it-IT-json-ab410570df07304cb0ca.js
24 KB ./excalidraw-assets/locales/ja-JP-json-2cb067da0fb518e73564.js
12 KB ./excalidraw-assets/locales/kaa-json-4d0a4868835d0334a549.js
20 KB ./excalidraw-assets/locales/kab-KAB-json-0d400ba2836cc0752cd6.js
12 KB ./excalidraw-assets/locales/kk-KZ-json-2224f237cc93465f126f.js
36 KB ./excalidraw-assets/locales/km-KH-json-cbe8e2e8d26d30a3175c.js
24 KB ./excalidraw-assets/locales/ko-KR-json-c2387972637d47f15765.js
32 KB ./excalidraw-assets/locales/ku-TR-json-bafa8865ed7002bb249e.js
16 KB ./excalidraw-assets/locales/lt-LT-json-9b7e91a51b90ee551cad.js
20 KB ./excalidraw-assets/locales/lv-LV-json-f7f9363e42ee2e3a7c67.js
40 KB ./excalidraw-assets/locales/mr-IN-json-ad1359c30c334d05eee0.js
20 KB ./excalidraw-assets/locales/my-MM-json-3ba296b6fcf2a2197a7c.js
20 KB ./excalidraw-assets/locales/nb-NO-json-798d785698d467e76fcf.js
20 KB ./excalidraw-assets/locales/nl-NL-json-2cf913fe2f491c5d7075.js
16 KB ./excalidraw-assets/locales/nn-NO-json-aa607835ad9408789c5f.js
20 KB ./excalidraw-assets/locales/oc-FR-json-644a5eaa1311f70cb697.js
28 KB ./excalidraw-assets/locales/pa-IN-json-165c5c2760688033b2cc.js
24 KB ./excalidraw-assets/locales/pl-PL-json-35c1f168f53af24b657a.js
24 KB ./excalidraw-assets/locales/pt-BR-json-370215dc506c58ee3217.js
20 KB ./excalidraw-assets/locales/pt-PT-json-6f3d80656622a222b4e2.js
24 KB ./excalidraw-assets/locales/ro-RO-json-3c32b962880e225d3416.js
32 KB ./excalidraw-assets/locales/ru-RU-json-e1f4ed9d2d074f778304.js
12 KB ./excalidraw-assets/locales/si-LK-json-4921d4298abfa256fe6f.js
24 KB ./excalidraw-assets/locales/sk-SK-json-27b59d7e026675f929c4.js
24 KB ./excalidraw-assets/locales/sl-SI-json-efb839ef0456f5c72e6e.js
24 KB ./excalidraw-assets/locales/sv-SE-json-cfab3adbd37dd273c61e.js
36 KB ./excalidraw-assets/locales/ta-IN-json-2fa1854af68381c61913.js
16 KB ./excalidraw-assets/locales/th-TH-json-9a390d3cc7a7a6226b63.js
20 KB ./excalidraw-assets/locales/tr-TR-json-fc9b16e9dc2be2660439.js
32 KB ./excalidraw-assets/locales/uk-UA-json-82753e98dced302ac187.js
16 KB ./excalidraw-assets/locales/vi-VN-json-9c1c2a9fa9d6b5a58223.js
20 KB ./excalidraw-assets/locales/zh-CN-json-069c304b5011429be615.js
12 KB ./excalidraw-assets/locales/zh-HK-json-d9bf1e4e2d1f8650c680.js
20 KB ./excalidraw-assets/locales/zh-TW-json-5a3fa7cacfa83c411d89.js
2896 KB ./excalidraw-assets/vendor-677e88ca78c86bddf13d.js
60 KB ./excalidraw-assets/Virgil.woff2
0 KB ./excalidraw-assets-dev
20 KB ./excalidraw-assets-dev/Assistant-Bold.woff2
20 KB ./excalidraw-assets-dev/Assistant-Medium.woff2
20 KB ./excalidraw-assets-dev/Assistant-Regular.woff2
20 KB ./excalidraw-assets-dev/Assistant-SemiBold.woff2
88 KB ./excalidraw-assets-dev/Cascadia.woff2
0 KB ./excalidraw-assets-dev/locales
28 KB ./excalidraw-assets-dev/locales/ar-SA-json-f35c4f87e6e2dcf7c20a.js
12 KB ./excalidraw-assets-dev/locales/az-AZ-json-5d70eb8bf3f20abc3bac.js
24 KB ./excalidraw-assets-dev/locales/bg-BG-json-88cced5fd8a6d8298501.js
24 KB ./excalidraw-assets-dev/locales/bn-BD-json-a06588c61947851c8579.js
20 KB ./excalidraw-assets-dev/locales/ca-ES-json-9b25933a25836cc0be23.js
20 KB ./excalidraw-assets-dev/locales/cs-CZ-json-1d6c97ea271d017058c9.js
12 KB ./excalidraw-assets-dev/locales/da-DK-json-34a60c9843cecd71376f.js
24 KB ./excalidraw-assets-dev/locales/de-DE-json-d13450595b795867412b.js
32 KB ./excalidraw-assets-dev/locales/el-GR-json-c854b199f3ac07d40294.js
24 KB ./excalidraw-assets-dev/locales/es-ES-json-6a667bfbf4ff3d0181a7.js
24 KB ./excalidraw-assets-dev/locales/eu-ES-json-3ec11367a80491b09056.js
28 KB ./excalidraw-assets-dev/locales/fa-IR-json-e459964936177074abe7.js
20 KB ./excalidraw-assets-dev/locales/fi-FI-json-f7839bb6f5ad0a3c7e0d.js
24 KB ./excalidraw-assets-dev/locales/fr-FR-json-20e8535e2675a6736c81.js
20 KB ./excalidraw-assets-dev/locales/gl-ES-json-861f534b46c0db1fa8db.js
24 KB ./excalidraw-assets-dev/locales/he-IL-json-504d78736487793ffccd.js
32 KB ./excalidraw-assets-dev/locales/hi-IN-json-82d988431011c330242a.js
20 KB ./excalidraw-assets-dev/locales/hu-HU-json-d4150250980011726fd9.js
24 KB ./excalidraw-assets-dev/locales/id-ID-json-82e300d4fe1e87adba9b.js
24 KB ./excalidraw-assets-dev/locales/it-IT-json-6ecc9aec005faab90f41.js
24 KB ./excalidraw-assets-dev/locales/ja-JP-json-3c6a065f0f1303b297fa.js
12 KB ./excalidraw-assets-dev/locales/kaa-json-983a9ccc652aa01980f3.js
20 KB ./excalidraw-assets-dev/locales/kab-KAB-json-cac3cf66f1db5c1a6e19.js
12 KB ./excalidraw-assets-dev/locales/kk-KZ-json-e9dd81c22419efd44478.js
40 KB ./excalidraw-assets-dev/locales/km-KH-json-be77acee611d96d88dda.js
24 KB ./excalidraw-assets-dev/locales/ko-KR-json-ad8e9d31d52b26f3fbc2.js
32 KB ./excalidraw-assets-dev/locales/ku-TR-json-ed67af91ae1920f114a8.js
16 KB ./excalidraw-assets-dev/locales/lt-LT-json-2c3d35d6fb5dbf95a27e.js
20 KB ./excalidraw-assets-dev/locales/lv-LV-json-fa8973c231afb2ddafe9.js
40 KB ./excalidraw-assets-dev/locales/mr-IN-json-2949146743072eb11b40.js
20 KB ./excalidraw-assets-dev/locales/my-MM-json-4c04ffe415641f69ed75.js
24 KB ./excalidraw-assets-dev/locales/nb-NO-json-b8d7a5b70562dacdad45.js
20 KB ./excalidraw-assets-dev/locales/nl-NL-json-a65f82a25fe038c45d35.js
20 KB ./excalidraw-assets-dev/locales/nn-NO-json-858fbccbc5be386977db.js
20 KB ./excalidraw-assets-dev/locales/oc-FR-json-a68ea08272c8da3c0e3f.js
32 KB ./excalidraw-assets-dev/locales/pa-IN-json-90a2b3775bd7d8983def.js
24 KB ./excalidraw-assets-dev/locales/pl-PL-json-9bb55330d5aaf336646e.js
24 KB ./excalidraw-assets-dev/locales/pt-BR-json-3635e753c1b6e5b681fa.js
24 KB ./excalidraw-assets-dev/locales/pt-PT-json-0d3694a92e0134549086.js
24 KB ./excalidraw-assets-dev/locales/ro-RO-json-e83fda16c860c6d0b383.js
32 KB ./excalidraw-assets-dev/locales/ru-RU-json-ddc13261ce5d864d36a9.js
12 KB ./excalidraw-assets-dev/locales/si-LK-json-16eb66dbfc6c55fc85b1.js
24 KB ./excalidraw-assets-dev/locales/sk-SK-json-782ead8707f2ad0e8e4e.js
24 KB ./excalidraw-assets-dev/locales/sl-SI-json-82e55cf7cdbdc7d7f959.js
24 KB ./excalidraw-assets-dev/locales/sv-SE-json-2f362899d3ac4089534f.js
36 KB ./excalidraw-assets-dev/locales/ta-IN-json-07623a485202da63a84b.js
16 KB ./excalidraw-assets-dev/locales/th-TH-json-4e4b97f5f6e905191383.js
20 KB ./excalidraw-assets-dev/locales/tr-TR-json-003be1cf6ebf0b787dec.js
32 KB ./excalidraw-assets-dev/locales/uk-UA-json-ca6ea1156db2649d3e27.js
16 KB ./excalidraw-assets-dev/locales/vi-VN-json-9a5e5fab41a1a120a916.js
20 KB ./excalidraw-assets-dev/locales/zh-CN-json-670c28a6ae1e3ddecaa4.js
12 KB ./excalidraw-assets-dev/locales/zh-HK-json-93b9b676d4f4b5702797.js
20 KB ./excalidraw-assets-dev/locales/zh-TW-json-805d10b0eed9ca51b318.js
17380 KB ./excalidraw-assets-dev/vendor-39727f4653a274cf18f6.js
60 KB ./excalidraw-assets-dev/Virgil.woff2
4 KB ./favicon-16x16-BFVwDe7F.png
4 KB ./favicon-16x16.png
4 KB ./favicon-32x32-QbsTyw2e.png
4 KB ./favicon-32x32.png
16 KB ./favicon.ico
27312 KB ./index.html

vadimkantorov avatar Feb 13 '25 23:02 vadimkantorov

Looking at the playground it seems that most of the build size comes from excalidraw

I see... Quite a lot of network footprint for a quite specific functionality...

vadimkantorov avatar Mar 08 '25 22:03 vadimkantorov