Skip to content

Commit

Permalink
chore: 优化webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden committed Nov 13, 2021
1 parent 2a3d36d commit dc77bba
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions scripts/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,11 @@ for (const entryName in config.entry) {
}
}

config.plugins = [new webpack.HotModuleReplacementPlugin(), ...(config.plugins || [])]

const compiler = webpack(config)

const server = new WebpackDevServer(
{
https: false,
hot: false,
client: false,
host: 'localhost',
port: PORT,
Expand All @@ -44,10 +41,6 @@ const server = new WebpackDevServer(
compiler,
)

if (process.env.NODE_ENV === 'development' && module.hot) {
module.hot.accept()
}

(async () => {
;(async () => {
await server.start()
})()

0 comments on commit dc77bba

Please sign in to comment.