only import webpack-dev-server in dev mode
This commit is contained in:
parent
d73d9a3ee6
commit
00e2074f88
@ -1,5 +1,4 @@
|
||||
import webpack from "webpack";
|
||||
import WebpackDevServer from "webpack-dev-server";
|
||||
import config from "../config/webpack.dev.js";
|
||||
|
||||
const devServerConfig = {
|
||||
@ -15,6 +14,7 @@ const devServerConfig = {
|
||||
};
|
||||
|
||||
export default async function startFrontendDevServer(port, resolve) {
|
||||
let WebpackDevServer = (await import("webpack-dev-server")).WebpackDevServer;
|
||||
resolve(1);
|
||||
await new WebpackDevServer(webpack(config), devServerConfig).start(port, (err) => {
|
||||
if (err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user