All Projects → ScriptedAlchemy → Webpackery

ScriptedAlchemy / Webpackery

Licence: mit
Webpack 4 Orchestration Layer allows for automated async code splitting of anything

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Webpackery

Typescript Hapi React Hot Loader Example
Simple TypeScript React Hot Loading example with Hapi Server-side rendering
Stars: ✭ 44 (+69.23%)
Mutual labels:  webpack4, code-splitting
React Pwa
An upgradable boilerplate for Progressive web applications (PWA) with server side rendering, build with SEO in mind and achieving max page speed and optimized user experience.
Stars: ✭ 2,433 (+9257.69%)
Mutual labels:  webpack4, code-splitting
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+780.77%)
Mutual labels:  webpack4, code-splitting
Desktop Cleaner
It is a Automated file organizer
Stars: ✭ 16 (-38.46%)
Mutual labels:  automation
Easy Vue
Learn vueJS Easily 👻
Stars: ✭ 896 (+3346.15%)
Mutual labels:  webpack4
Diffios
Cisco IOS diff tool
Stars: ✭ 23 (-11.54%)
Mutual labels:  automation
Datacleaner
A Python tool that automatically cleans data sets and readies them for analysis.
Stars: ✭ 933 (+3488.46%)
Mutual labels:  automation
React Latest Framework
a client framework of React
Stars: ✭ 835 (+3111.54%)
Mutual labels:  webpack4
Vkb
Bot for vk.com competitions
Stars: ✭ 24 (-7.69%)
Mutual labels:  automation
Supreme
A command line visual file manager for linux
Stars: ✭ 22 (-15.38%)
Mutual labels:  automation
Automation Report
Automation report是一款可以解决很多行业领域中设涉及到报告生成的需求,本项目最开始的初衷是为公司内部简化人工流程的一个环节,主要实现目的是将实验室检测得出的下机数据结果与对应的报告模版批量结合生成报告(.pdf)。
Stars: ✭ 22 (-15.38%)
Mutual labels:  automation
Auto App
Crie um aplicativo com todas as tabelas de um dos seus bancos sem uma linha de código.
Stars: ✭ 18 (-30.77%)
Mutual labels:  automation
Virtesk
An Open Source VDI management solution to allow running virtual desktops in a RHEV/Ovirt environment seamlessly
Stars: ✭ 23 (-11.54%)
Mutual labels:  automation
Flaui
UI automation library for .Net
Stars: ✭ 892 (+3330.77%)
Mutual labels:  automation
Awesome Hammerspoon
awesome configuration for Hammerspoon.
Stars: ✭ 928 (+3469.23%)
Mutual labels:  automation
Sneaky Scripts
Automated setup of development environments and other miscellaneous scripts.
Stars: ✭ 7 (-73.08%)
Mutual labels:  automation
Home Assistant Config
Home Assistant config files, rewritten to use the latest features, 100+ documented automations, automatically generated ToC 🏠 🤖
Stars: ✭ 926 (+3461.54%)
Mutual labels:  automation
Pre Commit Terraform
pre-commit git hooks to take care of Terraform configurations
Stars: ✭ 902 (+3369.23%)
Mutual labels:  automation
Webdriverio Jest
Example of a WebdriverIO test written with the Jest framework
Stars: ✭ 19 (-26.92%)
Mutual labels:  automation
Pybotlib
Python Robotic Process Automation Library
Stars: ✭ 23 (-11.54%)
Mutual labels:  automation

webpackery

Webpack 4 Orchestration Layer allows for automated async code splitting of anything

Webpack is an amazing crutch while I build a sophisicated architecture - This Orchastration layer will soon be completely standalone & plug-n-play with with other budlers.

I want to prepare for HTTP 2 server push. To do so, I'll use Webpack and play a series of tricks on it. Hate on Webpack if you want. Ill love and respect it always <3. So Webpack is the catalyst for this architecture, The idea is to make a robust infrastructure which could one day be swapped out with another build underlayer.

For the time being, It'll stay Webpack only.

This has been months of obsessing Made with love <3 Welcome to the Unbundling

Big thanks to FaceySpacey and React-Static The DM's, e-mails and calls gave me enough context to be able to build it.

The Problem

  • Code splitting is cumbersome, requiring changes to development processes.
  • No real support for LOSA Architecture
  • No holy grail efficient way to cache assets without using externals
  • Reducing code duplication in multiple builds is painful and inefficient

Goal

  • Truly code split any build with no change to the codebase.
  • async load any import without needing a to write promises.
  • allow resources to be shared between independent builds from independent systems.
  • leverage webpack against itself to and trick it into handing over some control to me.

TODO

  • bespoke delivery mechanism, module concatenation-deconcatenation for delivery.
  • Leverage service workers to intercept and stream code directly into a browser cache.
  • Stream multiple requests as one file but cache each request with its corresponding code. 1 request = 5 cached modules
  • Create chunk graph interface. Teach webpack to preload next routes.
  • Create an interface for asking or injecting chunks by name (react,lodash)
  • Allow SSR without babel loaders or resolveWeak. (hopefully)
  • Create instantiation reporting from the server.
  • Allow asynchronous, out of order asset loading.
  • Create advanced, self-correction mechanisms.

Non-negotiables

  • The user still has full control over the build.
  • Webpack builds do not need any elaborate changes
  • Must be able to operate statically with no servers.
  • Architecture should be completely self-contained. Requiring no more than 5 lines of code, regardless of project size
  • Code-splitting with SSR should take no longer than 5 mins
  • Must work seamlessly with absolutely any build & any framework
  • Must be set up in a compatible way for HTTP 2 server push
  • Should optimize chunk delivery and reduce requests on HTTP 1 without needing to run any build

Motivation

  • Hasn't been done yet
  • I want to code split an entire company in less than a day
  • I already have it working, so might as well take it up a level and see what happens :)

Establishing Results

  • Use react performance reporting, bind it to grafana. (ill be using this for react, but it is framework agnosticwith anything)
  • Bind any and every event to grafana within another thread.
  • Build elaborate charts and results

Timeline

Changed due to enhanced infrastructure.

  • 4 weeks watching tv at night
  • Realistically - 5 - 8 weeks till its delivered That's the idea, but I work on many things.

Known challanges

Many script tags are hard to thread and compile client side

Ill have a two-way concatenation-deconcatenation threaded worker. I can retrieve chunk(s) and either concatenate the modules OR deconcatenate them. If the browser asks for 9 assets, the worker truncates the calls of 8, then join the modules into the 9th "asset" and return it. The other consideration is a fake script call each time which is populated with a buffer. I'll be able to cache each asset on its own via SW APIs to browser caches, how the last mile delivery happens does not matter, as long as its blazing fast.

One thread gets stuck, what happens?

I can make webpack error correct further and use other modules on the page to query the status. Worst case I will ask another module to retrieve it and the web-worker will truncate the current call. I might open a stream, so there is never a delay on cache misses this won't work for CDNs though.

Its never been done, so how are you going to do it

http://worrydream.com/LadderOfAbstraction/

How do you stop the download of unexecuted code?

I have and will extend / PR webpack with additional architectural metadata on the dependency graph - if need be. Before asking for the resource, a separate worker will resolve the existing execution chain - via reporting mechanics.

What about IE 9/10

What is the marital status of the number 5? A Reference to quantum mechanics super-positions - Question doesn't even make sense to ask

Framework Specific Issues

Any issues that Frameworks cause

React

Cant render async

Many ways to fix this. RUC, Async Redux, Shallow Render In Threads, Hoist React17 Reconciliation, closed loop module patching. Tricky, but don't see what the big issue is beyond just sitting down and making it happen.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].