mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-10 05:18:01 +02:00
chore(v2): remove hardcoded references to config filename
This commit is contained in:
parent
7dae4bd0d1
commit
c46a894a01
8 changed files with 96 additions and 64 deletions
|
@ -8,6 +8,7 @@
|
|||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const {idx} = require('./utils');
|
||||
const loadConfig = require('./config');
|
||||
|
||||
module.exports = function loadEnv({siteDir, siteConfig}) {
|
||||
// Translation
|
||||
|
@ -36,7 +37,9 @@ module.exports = function loadEnv({siteDir, siteConfig}) {
|
|||
);
|
||||
if (!defaultLanguage) {
|
||||
throw new Error(
|
||||
`Please set a default language in 'docusaurus.config.js' which is enabled in 'languages.js'`,
|
||||
`Please set a default language in ${
|
||||
loadConfig.configFileName
|
||||
} which is enabled in 'languages.js'`,
|
||||
);
|
||||
}
|
||||
translation.defaultLanguage = defaultLanguage;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue