Only try to require configuration server when there is an app

This commit is contained in:
Aurelsicoko 2018-01-12 14:53:20 +01:00
parent 8d0a8379d0
commit cc455ee309

View File

@ -69,8 +69,7 @@ const plugins = [
let publicPath;
// Build the `index.html file`
if (isAdmin) {
if (isAdmin && !isSetup) {
// Load server configuration.
const serverConfig = path.resolve(appPath, 'config', 'environments', _.lowerCase(process.env.NODE_ENV), 'server.json');
@ -87,7 +86,10 @@ if (isAdmin) {
} catch (e) {
throw new Error(`Impossible to access to ${serverConfig}`);
}
}
// Build the `index.html file`
if (isAdmin) {
plugins.push(new HtmlWebpackPlugin({
template: 'admin/src/index.html',
minify: {