-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove webpack.*.ts importing values from src/ (#4992)
- Loading branch information
Showing
21 changed files
with
149 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* Copyright (c) OpenLens Authors. All rights reserved. | ||
* Licensed under MIT License. See LICENSE in root directory for more information. | ||
*/ | ||
|
||
import Webpack from "webpack"; | ||
import WebpackDevServer from "webpack-dev-server"; | ||
import { webpackLensRenderer } from "./renderer"; | ||
import logger from "../src/common/logger"; | ||
import { buildDir, webpackDevServerPort } from "./vars"; | ||
|
||
/** | ||
* API docs: | ||
* @url https://webpack.js.org/configuration/dev-server/ | ||
* @url https://github.com/chimurai/http-proxy-middleware | ||
*/ | ||
const config = webpackLensRenderer({ showVars: false }); | ||
const compiler = Webpack(config); | ||
|
||
const server = new WebpackDevServer({ | ||
setupExitSignals: true, | ||
headers: { | ||
"Access-Control-Allow-Origin": "*", | ||
}, | ||
allowedHosts: "all", | ||
host: "localhost", | ||
port: webpackDevServerPort, | ||
static: buildDir, // aka `devServer.contentBase` in webpack@4 | ||
hot: "only", // use HMR only without errors | ||
liveReload: false, | ||
devMiddleware: { | ||
writeToDisk: false, | ||
index: "OpenLensDev.html", | ||
publicPath: "/build", | ||
}, | ||
proxy: { | ||
"^/$": "/build/", | ||
}, | ||
client: { | ||
overlay: false, // don't show warnings and errors on top of rendered app view | ||
logging: "error", | ||
}, | ||
}, compiler); | ||
|
||
logger.info(`[WEBPACK-DEV-SERVER]: created with options`, server.options); | ||
|
||
server.start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.