fix: devServer last

This commit is contained in:
cha0s 2020-12-17 05:07:59 -06:00
parent 931596d0a4
commit db5a66d1e2

View File

@ -49,12 +49,6 @@ const client = {
.use(EnvironmentPlugin, [{
SIDE: 'client',
}]);
if ('production' !== neutrino.config.get('mode')) {
neutrino.config.devServer
.host(HTTP_DEV_HOST)
.port(HTTP_DEV_PORT)
.public(HTTP_DEV_PUBLIC);
}
},
(neutrino) => {
class LatusPlugin {
@ -110,6 +104,18 @@ client.use.push((neutrino) => {
...options,
title,
}]);
const isProduction = 'production' === neutrino.config.get('mode');
if (!isProduction) {
neutrino.config.devServer
.host(HTTP_DEV_HOST)
.port(HTTP_DEV_PORT)
.public(HTTP_DEV_PUBLIC);
}
neutrino.config.output
.chunkFilename(
isProduction ? 'assets/[name].[contenthash:8].js' : 'assets/[name].js',
);
});
module.exports = client;