mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 17:29:14 +00:00
Only try to require configuration server when there is an app
This commit is contained in:
parent
8d0a8379d0
commit
cc455ee309
@ -69,8 +69,7 @@ const plugins = [
|
|||||||
|
|
||||||
let publicPath;
|
let publicPath;
|
||||||
|
|
||||||
// Build the `index.html file`
|
if (isAdmin && !isSetup) {
|
||||||
if (isAdmin) {
|
|
||||||
// Load server configuration.
|
// Load server configuration.
|
||||||
const serverConfig = path.resolve(appPath, 'config', 'environments', _.lowerCase(process.env.NODE_ENV), 'server.json');
|
const serverConfig = path.resolve(appPath, 'config', 'environments', _.lowerCase(process.env.NODE_ENV), 'server.json');
|
||||||
|
|
||||||
@ -87,7 +86,10 @@ if (isAdmin) {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`Impossible to access to ${serverConfig}`);
|
throw new Error(`Impossible to access to ${serverConfig}`);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build the `index.html file`
|
||||||
|
if (isAdmin) {
|
||||||
plugins.push(new HtmlWebpackPlugin({
|
plugins.push(new HtmlWebpackPlugin({
|
||||||
template: 'admin/src/index.html',
|
template: 'admin/src/index.html',
|
||||||
minify: {
|
minify: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user