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

Add webpack hot-reload/cache plugins to improve Lens DX #1250

Merged
merged 8 commits into from
Nov 9, 2020

Conversation

chenhunghan
Copy link
Contributor

@chenhunghan chenhunghan commented Nov 6, 2020

for better DX..

  • Add webpack-dev-server/react-refresh/react-refresh-webpack-plugin for hot-reload support, and add condition (see here)to redirect static file requests (/LensDev.js/LensDev.html) to webpack-dev-server. React-refresh is experimental, but seems to work fine.
  • Add type-fest for support of typescript for react-refresh-webpack-plugin according to its README.
  • Add hard-source-webpack-plugin for caching both main and renderer, the caching will improve webpack re-pack speed (like the old webpack DLL plugin). Webpack 5 support this out-of--the-box so we should remove this when upgrade to Webpack 5.
  • I tried to upgrade to Webpack 5 but failed, too many error regarding the plugins.

@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Nov 6, 2020
@ixrock
Copy link
Contributor

ixrock commented Nov 6, 2020

Awesome! Seems to work fine and stable!

@aleksfront
Copy link
Contributor

👏

@jakolehm jakolehm added the enhancement New feature or request label Nov 6, 2020
… add HardSourceWebpackPlugin to improve re-compiling speed

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
…t request of Lens.html/Lens.js to webpack-dev-server

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
…vserver

Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
@chenhunghan chenhunghan changed the title Add hot-reload/webpack-dev-servber for renderer process Add webpack hot-reload/cache plugins to improve Lens DX Nov 9, 2020
@chenhunghan chenhunghan marked this pull request as ready for review November 9, 2020 11:00
@chenhunghan chenhunghan requested a review from a team November 9, 2020 11:56
Copy link
Contributor

@ixrock ixrock left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants