fix: devServer last
This commit is contained in:
parent
931596d0a4
commit
db5a66d1e2
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user