mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add webpack hot-reload/cache plugins to improve Lens DX (#1250)
* Add webpack-dev-server (for hot module replacement) to serve statics, add HardSourceWebpackPlugin to improve re-compiling speed * Serve statics using webpack-dev-server instead of lens-proxy, redirect request of Lens.html/Lens.js to webpack-dev-server * Add react-refresh-webpack-plugin and its dep for hot-reload * Add hot-reload plugin, and make proxy redirects requests to webpackdevserver * Add hard-source webpack plugin to main process * Remove parameter 'path' of handleStaticFile * Upgarde webpack to v4 latest stable * Fix build error: plugins shouldnt be null Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
6 files changed
+1159
-60
No files matched your search
@@ -22,6 +22,7 @@ export const mainDir = path.join(contextDir, "src/main");
|
||||
export const rendererDir = path.join(contextDir, "src/renderer");
|
||||
export const htmlTemplate = path.resolve(rendererDir, "template.html");
|
||||
export const sassCommonVars = path.resolve(rendererDir, "components/vars.scss");
|
||||
export const webpackDevServerPort = 9009
|
||||
|
||||
// Special runtime paths
|
||||
defineGlobal("__static", {
|
||||
|
||||
Reference in new issue
Block a user