From cc455ee309bb1cff776d1b29c847dd388d63f27e Mon Sep 17 00:00:00 2001 From: Aurelsicoko Date: Fri, 12 Jan 2018 14:53:20 +0100 Subject: [PATCH] Only try to require configuration server when there is an app --- .../lib/internals/webpack/webpack.prod.babel.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js index 015677e87e..65e5f2bf45 100755 --- a/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js +++ b/packages/strapi-helper-plugin/lib/internals/webpack/webpack.prod.babel.js @@ -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: {