Уже почти всё настроено (но с node-dev-server есть траблы)

This commit is contained in:
ErickSkrauch
2016-05-05 11:15:53 +03:00
parent 256d2322c6
commit 847a610d4b
3 changed files with 24 additions and 0 deletions

View File

@@ -30,6 +30,8 @@ var isTest = process.argv.some(function(arg) {
return arg.indexOf('karma') !== -1;
});
var isDockerized = !!process.env.DOCKERIZED;
process.env.NODE_ENV = isProduction ? 'production' : 'development';
if (isTest) {
process.env.NODE_ENV = 'test';
@@ -205,6 +207,12 @@ var webpackConfig = {
]
};
if (isDockerized) {
webpackConfig.watchOptions = {
poll: 2000
};
webpackConfig.devServer.host = '0.0.0.0';
}
if (isProduction) {
webpackConfig.module.loaders.forEach((loader) => {