Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to achieve prefetch for workers #402

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

developit
Copy link
Member

No description provided.

@@ -11,7 +11,7 @@
"start": "npm run -s server",
"prestart": "npm run -s build",
"server": "superstatic build -p ${PORT:-8080} --host 0.0.0.0 --gzip -c '{\"rewrites\": [{\"source\":\"**\",\"destination\":\"index.html\"}],\"headers\":[{\"source\":\"**\",\"headers\":[{\"key\":\"Cache-Control\",\"value\":\"max-age=31536000\"}]}]}'",
"build": "preact build --prerenderUrls src/prerender.js --template src/template.html",
"build": "preact build --no-esm --prerenderUrls src/prerender.js --template src/template.html",
"postbuild": "cat src/_headers >> build/_headers",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No esm build?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it sortof breaks with the workers, since they never have .esm.js

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-ssr
Overall size: 174 kB (-186 B ✅)

    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+3 B)
            ssr-bundle.js ⏤  27.6 kB
    prism.cb930.worker.js ⏤  6.24 kB
 markdown.7436b.worker.js ⏤  8.61 kB
     repl.6be8a.worker.js ⏤  0 B (-37 kB ✅)
   editor.chunk.cc117.css ⏤  0 B (-3.17 kB ✅)
     ssr-bundle.319a3.css ⏤  0 B (-10.8 kB ✅)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)
   editor.chunk.7a736.css ⏤  3.17 kB (+3.17 kB 🚫)
     ssr-bundle.c35c4.css ⏤  10.8 kB (+10.8 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-browser
Overall size: 175 kB (-195 B ✅)

                    sw.js ⏤  672 B
    prism.5e280.worker.js ⏤  6.26 kB
 markdown.0ff4e.worker.js ⏤  8.68 kB
     repl.59cdc.worker.js ⏤  0 B (-36.5 kB ✅)
         bundle.0dfb4.css ⏤  0 B (-9.07 kB ✅)
          bundle.*****.js ⏤  23.3 kB (-2 B)
   editor.chunk.cc117.css ⏤  0 B (-2.15 kB ✅)
    editor.chunk.*****.js ⏤  66.4 kB
     emoji.chunk.*****.js ⏤  8.85 kB
       polyfills.*****.js ⏤  2.12 kB
    runner.chunk.*****.js ⏤  5.83 kB
        5.chunk.61a1b.css ⏤  0 B (-1.47 kB ✅)
         5.chunk.*****.js ⏤  3.45 kB
     repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
         bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
   editor.chunk.7a736.css ⏤  2.15 kB (+2.15 kB 🚫)
        5.chunk.bc319.css ⏤  1.47 kB (+1.47 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-ssr
Overall size: 174 kB (-186 B ✅)

    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+3 B)
            ssr-bundle.js ⏤  27.6 kB
    prism.cb930.worker.js ⏤  6.24 kB
 markdown.7436b.worker.js ⏤  8.61 kB
     repl.6be8a.worker.js ⏤  0 B (-37 kB ✅)
   editor.chunk.cc117.css ⏤  0 B (-3.17 kB ✅)
     ssr-bundle.319a3.css ⏤  0 B (-10.8 kB ✅)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)
   editor.chunk.7a736.css ⏤  3.17 kB (+3.17 kB 🚫)
     ssr-bundle.c35c4.css ⏤  10.8 kB (+10.8 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-browser
Overall size: 175 kB (-195 B ✅)

                    sw.js ⏤  672 B
    prism.5e280.worker.js ⏤  6.26 kB
 markdown.0ff4e.worker.js ⏤  8.68 kB
     repl.59cdc.worker.js ⏤  0 B (-36.5 kB ✅)
         bundle.0dfb4.css ⏤  0 B (-9.07 kB ✅)
          bundle.*****.js ⏤  23.3 kB (-2 B)
   editor.chunk.cc117.css ⏤  0 B (-2.15 kB ✅)
    editor.chunk.*****.js ⏤  66.4 kB
     emoji.chunk.*****.js ⏤  8.85 kB
       polyfills.*****.js ⏤  2.12 kB
    runner.chunk.*****.js ⏤  5.83 kB
        5.chunk.61a1b.css ⏤  0 B (-1.47 kB ✅)
         5.chunk.*****.js ⏤  3.45 kB
     repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
         bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
   editor.chunk.7a736.css ⏤  2.15 kB (+2.15 kB 🚫)
        5.chunk.bc319.css ⏤  1.47 kB (+1.47 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-ssr
Overall size: 174 kB (-186 B ✅)

    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+3 B)
            ssr-bundle.js ⏤  27.6 kB
    prism.cb930.worker.js ⏤  6.24 kB
 markdown.7436b.worker.js ⏤  8.61 kB
     repl.6be8a.worker.js ⏤  0 B (-37 kB ✅)
   editor.chunk.cc117.css ⏤  0 B (-3.17 kB ✅)
     ssr-bundle.319a3.css ⏤  0 B (-10.8 kB ✅)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)
   editor.chunk.7a736.css ⏤  3.17 kB (+3.17 kB 🚫)
     ssr-bundle.c35c4.css ⏤  10.8 kB (+10.8 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 26, 2019

size-plugin-browser
Overall size: 175 kB (-195 B ✅)

                    sw.js ⏤  672 B
    prism.5e280.worker.js ⏤  6.26 kB
 markdown.0ff4e.worker.js ⏤  8.68 kB
     repl.59cdc.worker.js ⏤  0 B (-36.5 kB ✅)
         bundle.0dfb4.css ⏤  0 B (-9.07 kB ✅)
          bundle.*****.js ⏤  23.3 kB (-2 B)
   editor.chunk.cc117.css ⏤  0 B (-2.15 kB ✅)
    editor.chunk.*****.js ⏤  66.4 kB
     emoji.chunk.*****.js ⏤  8.85 kB
       polyfills.*****.js ⏤  2.12 kB
    runner.chunk.*****.js ⏤  5.83 kB
        5.chunk.61a1b.css ⏤  0 B (-1.47 kB ✅)
         5.chunk.*****.js ⏤  3.45 kB
     repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
         bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
   editor.chunk.7a736.css ⏤  2.15 kB (+2.15 kB 🚫)
        5.chunk.bc319.css ⏤  1.47 kB (+1.47 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-ssr
Overall size: 174 kB (+83 B)

 markdown.e0970.worker.js ⏤  0 B (-8.61 kB ✅)
    prism.28075.worker.js ⏤  0 B (-6.24 kB ✅)
    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+2 B)
            ssr-bundle.js ⏤  27.6 kB (+83 B)
     repl.e198e.worker.js ⏤  0 B (-36.9 kB ✅)
   editor.chunk.7a736.css ⏤  3.17 kB
     ssr-bundle.c35c4.css ⏤  10.8 kB
    prism.cb930.worker.js ⏤  6.24 kB (+6.24 kB 🚫)
 markdown.7436b.worker.js ⏤  8.61 kB (+8.61 kB 🚫)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-browser
Overall size: 175 kB (-154 kB ✅)

                 sw-esm.js ⏤  0 B (-682 B ✅)
                     sw.js ⏤  672 B (-6 B)
  markdown.bc303.worker.js ⏤  0 B (-8.68 kB ✅)
     prism.18eb5.worker.js ⏤  0 B (-6.26 kB ✅)
  emoji.chunk.91398.esm.js ⏤  0 B (-8.85 kB ✅)
    polyfills.6a525.esm.js ⏤  0 B (-2.13 kB ✅)
  markdown.8ff2c.worker.js ⏤  0 B (-8.68 kB ✅)
      emoji.chunk.1ed91.js ⏤  0 B (-8.85 kB ✅)
        polyfills.3233a.js ⏤  0 B (-2.12 kB ✅)
      repl.0b7a0.worker.js ⏤  0 B (-34.9 kB ✅)
          bundle.59d82.css ⏤  0 B (-9.07 kB ✅)
       bundle.f80d9.esm.js ⏤  0 B (-22.9 kB ✅)
    editor.chunk.7a736.css ⏤  2.15 kB
 editor.chunk.fa6b3.esm.js ⏤  0 B (-66.3 kB ✅)
 runner.chunk.a92f8.esm.js ⏤  0 B (-5.79 kB ✅)
         5.chunk.bc319.css ⏤  1.47 kB
      5.chunk.95a73.esm.js ⏤  0 B (-3.39 kB ✅)
      repl.3f385.worker.js ⏤  0 B (-36.4 kB ✅)
           bundle.b74a6.js ⏤  0 B (-23.2 kB ✅)
     editor.chunk.e0251.js ⏤  0 B (-66.4 kB ✅)
     runner.chunk.2df13.js ⏤  0 B (-5.83 kB ✅)
          5.chunk.b2018.js ⏤  0 B (-3.45 kB ✅)
  markdown.0ff4e.worker.js ⏤  8.68 kB (+8.68 kB 🚫)
     prism.5e280.worker.js ⏤  6.26 kB (+6.26 kB 🚫)
      repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
          bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
           bundle.*****.js ⏤  23.3 kB (+23.3 kB 🚫)
     editor.chunk.*****.js ⏤  66.4 kB (+66.4 kB 🚫)
      emoji.chunk.*****.js ⏤  8.85 kB (+8.85 kB 🚫)
        polyfills.*****.js ⏤  2.12 kB (+2.12 kB 🚫)
     runner.chunk.*****.js ⏤  5.83 kB (+5.83 kB 🚫)
          5.chunk.*****.js ⏤  3.45 kB (+3.45 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-ssr
Overall size: 175 kB (+1.42 kB 🚫)

 markdown.e0970.worker.js ⏤  0 B (-8.61 kB ✅)
    prism.28075.worker.js ⏤  0 B (-6.24 kB ✅)
    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+2 B)
            ssr-bundle.js ⏤  27.6 kB (+82 B)
     repl.e198e.worker.js ⏤  0 B (-36.9 kB ✅)
   editor.chunk.7a736.css ⏤  3.17 kB
     ssr-bundle.c35c4.css ⏤  10.8 kB
    prism.cb930.worker.js ⏤  6.24 kB (+6.24 kB 🚫)
 markdown.22fca.worker.js ⏤  9.95 kB (+9.95 kB 🚫)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-browser
Overall size: 176 kB (-152 kB ✅)

                 sw-esm.js ⏤  0 B (-682 B ✅)
                     sw.js ⏤  672 B (-6 B)
  markdown.bc303.worker.js ⏤  0 B (-8.68 kB ✅)
     prism.18eb5.worker.js ⏤  0 B (-6.26 kB ✅)
  emoji.chunk.91398.esm.js ⏤  0 B (-8.85 kB ✅)
    polyfills.6a525.esm.js ⏤  0 B (-2.13 kB ✅)
  markdown.8ff2c.worker.js ⏤  0 B (-8.68 kB ✅)
      emoji.chunk.1ed91.js ⏤  0 B (-8.85 kB ✅)
        polyfills.3233a.js ⏤  0 B (-2.12 kB ✅)
      repl.0b7a0.worker.js ⏤  0 B (-34.9 kB ✅)
          bundle.59d82.css ⏤  0 B (-9.07 kB ✅)
    editor.chunk.7a736.css ⏤  2.15 kB
 editor.chunk.fa6b3.esm.js ⏤  0 B (-66.3 kB ✅)
 runner.chunk.a92f8.esm.js ⏤  0 B (-5.79 kB ✅)
         5.chunk.bc319.css ⏤  1.47 kB
      5.chunk.95a73.esm.js ⏤  0 B (-3.39 kB ✅)
      repl.3f385.worker.js ⏤  0 B (-36.4 kB ✅)
     editor.chunk.e0251.js ⏤  0 B (-66.4 kB ✅)
     runner.chunk.2df13.js ⏤  0 B (-5.83 kB ✅)
          5.chunk.b2018.js ⏤  0 B (-3.45 kB ✅)
       bundle.dde29.esm.js ⏤  0 B (-22.9 kB ✅)
           bundle.935d6.js ⏤  0 B (-23.2 kB ✅)
  markdown.9eef5.worker.js ⏤  10 kB (+10 kB 🚫)
     prism.5e280.worker.js ⏤  6.26 kB (+6.26 kB 🚫)
      repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
          bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
           bundle.*****.js ⏤  23.3 kB (+23.3 kB 🚫)
     editor.chunk.*****.js ⏤  66.4 kB (+66.4 kB 🚫)
      emoji.chunk.*****.js ⏤  8.85 kB (+8.85 kB 🚫)
        polyfills.*****.js ⏤  2.12 kB (+2.12 kB 🚫)
     runner.chunk.*****.js ⏤  5.83 kB (+5.83 kB 🚫)
          5.chunk.*****.js ⏤  3.45 kB (+3.45 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-ssr
Overall size: 178 kB (+4.09 kB 🚫)

 markdown.e0970.worker.js ⏤  0 B (-8.61 kB ✅)
    prism.28075.worker.js ⏤  0 B (-6.24 kB ✅)
    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+2 B)
            ssr-bundle.js ⏤  29 kB (+1.4 kB 🚫)
     repl.e198e.worker.js ⏤  0 B (-36.9 kB ✅)
   editor.chunk.7a736.css ⏤  3.17 kB
     ssr-bundle.c35c4.css ⏤  0 B (-10.8 kB ✅)
    prism.d7c59.worker.js ⏤  7.6 kB (+7.6 kB 🚫)
 markdown.22fca.worker.js ⏤  9.95 kB (+9.95 kB 🚫)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)
     ssr-bundle.f1b10.css ⏤  10.8 kB (+10.8 kB 🚫)

1 similar comment
@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-ssr
Overall size: 178 kB (+4.09 kB 🚫)

 markdown.e0970.worker.js ⏤  0 B (-8.61 kB ✅)
    prism.28075.worker.js ⏤  0 B (-6.24 kB ✅)
    editor.chunk.*****.js ⏤  65.9 kB
     emoji.chunk.*****.js ⏤  8.83 kB
    runner.chunk.*****.js ⏤  5.86 kB (+2 B)
            ssr-bundle.js ⏤  29 kB (+1.4 kB 🚫)
     repl.e198e.worker.js ⏤  0 B (-36.9 kB ✅)
   editor.chunk.7a736.css ⏤  3.17 kB
     ssr-bundle.c35c4.css ⏤  0 B (-10.8 kB ✅)
    prism.d7c59.worker.js ⏤  7.6 kB (+7.6 kB 🚫)
 markdown.22fca.worker.js ⏤  9.95 kB (+9.95 kB 🚫)
     repl.35db5.worker.js ⏤  36.9 kB (+36.9 kB 🚫)
     ssr-bundle.f1b10.css ⏤  10.8 kB (+10.8 kB 🚫)

@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-browser
Overall size: 177 kB (-151 kB ✅)

                 sw-esm.js ⏤  0 B (-682 B ✅)
                     sw.js ⏤  672 B (-6 B)
  markdown.bc303.worker.js ⏤  0 B (-8.68 kB ✅)
     prism.18eb5.worker.js ⏤  0 B (-6.26 kB ✅)
  emoji.chunk.91398.esm.js ⏤  0 B (-8.85 kB ✅)
    polyfills.6a525.esm.js ⏤  0 B (-2.13 kB ✅)
  markdown.8ff2c.worker.js ⏤  0 B (-8.68 kB ✅)
      emoji.chunk.1ed91.js ⏤  0 B (-8.85 kB ✅)
        polyfills.3233a.js ⏤  0 B (-2.12 kB ✅)
      repl.0b7a0.worker.js ⏤  0 B (-34.9 kB ✅)
          bundle.59d82.css ⏤  0 B (-9.07 kB ✅)
    editor.chunk.7a736.css ⏤  2.15 kB
 editor.chunk.fa6b3.esm.js ⏤  0 B (-66.3 kB ✅)
 runner.chunk.a92f8.esm.js ⏤  0 B (-5.79 kB ✅)
         5.chunk.bc319.css ⏤  1.47 kB
      5.chunk.95a73.esm.js ⏤  0 B (-3.39 kB ✅)
      repl.3f385.worker.js ⏤  0 B (-36.4 kB ✅)
     editor.chunk.e0251.js ⏤  0 B (-66.4 kB ✅)
     runner.chunk.2df13.js ⏤  0 B (-5.83 kB ✅)
          5.chunk.b2018.js ⏤  0 B (-3.45 kB ✅)
       bundle.dde29.esm.js ⏤  0 B (-22.9 kB ✅)
           bundle.935d6.js ⏤  0 B (-23.2 kB ✅)
  markdown.9eef5.worker.js ⏤  10 kB (+10 kB 🚫)
     prism.31ed3.worker.js ⏤  7.68 kB (+7.68 kB 🚫)
      repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
          bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
           bundle.*****.js ⏤  23.3 kB (+23.3 kB 🚫)
     editor.chunk.*****.js ⏤  66.4 kB (+66.4 kB 🚫)
      emoji.chunk.*****.js ⏤  8.85 kB (+8.85 kB 🚫)
        polyfills.*****.js ⏤  2.12 kB (+2.12 kB 🚫)
     runner.chunk.*****.js ⏤  5.83 kB (+5.83 kB 🚫)
          5.chunk.*****.js ⏤  3.45 kB (+3.45 kB 🚫)

1 similar comment
@size-plugin
Copy link
Contributor

size-plugin bot commented Aug 29, 2019

size-plugin-browser
Overall size: 177 kB (-151 kB ✅)

                 sw-esm.js ⏤  0 B (-682 B ✅)
                     sw.js ⏤  672 B (-6 B)
  markdown.bc303.worker.js ⏤  0 B (-8.68 kB ✅)
     prism.18eb5.worker.js ⏤  0 B (-6.26 kB ✅)
  emoji.chunk.91398.esm.js ⏤  0 B (-8.85 kB ✅)
    polyfills.6a525.esm.js ⏤  0 B (-2.13 kB ✅)
  markdown.8ff2c.worker.js ⏤  0 B (-8.68 kB ✅)
      emoji.chunk.1ed91.js ⏤  0 B (-8.85 kB ✅)
        polyfills.3233a.js ⏤  0 B (-2.12 kB ✅)
      repl.0b7a0.worker.js ⏤  0 B (-34.9 kB ✅)
          bundle.59d82.css ⏤  0 B (-9.07 kB ✅)
    editor.chunk.7a736.css ⏤  2.15 kB
 editor.chunk.fa6b3.esm.js ⏤  0 B (-66.3 kB ✅)
 runner.chunk.a92f8.esm.js ⏤  0 B (-5.79 kB ✅)
         5.chunk.bc319.css ⏤  1.47 kB
      5.chunk.95a73.esm.js ⏤  0 B (-3.39 kB ✅)
      repl.3f385.worker.js ⏤  0 B (-36.4 kB ✅)
     editor.chunk.e0251.js ⏤  0 B (-66.4 kB ✅)
     runner.chunk.2df13.js ⏤  0 B (-5.83 kB ✅)
          5.chunk.b2018.js ⏤  0 B (-3.45 kB ✅)
       bundle.dde29.esm.js ⏤  0 B (-22.9 kB ✅)
           bundle.935d6.js ⏤  0 B (-23.2 kB ✅)
  markdown.9eef5.worker.js ⏤  10 kB (+10 kB 🚫)
     prism.31ed3.worker.js ⏤  7.68 kB (+7.68 kB 🚫)
      repl.d39c7.worker.js ⏤  36.4 kB (+36.4 kB 🚫)
          bundle.f4be6.css ⏤  9.07 kB (+9.07 kB 🚫)
           bundle.*****.js ⏤  23.3 kB (+23.3 kB 🚫)
     editor.chunk.*****.js ⏤  66.4 kB (+66.4 kB 🚫)
      emoji.chunk.*****.js ⏤  8.85 kB (+8.85 kB 🚫)
        polyfills.*****.js ⏤  2.12 kB (+2.12 kB 🚫)
     runner.chunk.*****.js ⏤  5.83 kB (+5.83 kB 🚫)
          5.chunk.*****.js ⏤  3.45 kB (+3.45 kB 🚫)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants