Giter Club home page Giter Club logo

distribute-webpack's Introduction

Distribute Webpack Worker

Intro

  • Purpose: reduce webpack build time by

    1. pre-install and pre-build vendor then zip the repo
    2. distribute the webpack workloads of apps into different container which can scales horizontally
  • Testing repo: webpack-code-split

    • all apps are sharing same vendor bundle.
    • it can build-vendor and npm run build-apps -- --env apps=app1,app2 separately

1. Prepare Webpack Runner

  1. cd docker-webpack-runner && docker build . -t webpackrunner

2. Start File Server - go-simple-upload-server

  1. git clone https://github.com/mayth/go-simple-upload-server
  2. cd go-simple-upload-server
  3. change maxUploadSize to larger size in simple_upload_server.go
  4. docker build . -t mayth/simple-upload-server to rebuild image
  5. mkdir $HOME/tmp make a local workSpace $HOME/tmp for the fileServer
  6. docker run -p 25478:25478 -v $HOME/tmp:/var/root mayth/simple-upload-server -token f9403fc5f537b4ab332d /var/root
  7. now the file server will run in the background

3. node master.js

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.